git.iko.soy/rowtype-yoga/purescript-yoga-react-native
on main help sign in
69285c1Mark
example-macos/macos/YogaReactExample-macOS/RCTMacOSControlsManager.m+3−1
@@ -2474,6 +2474,7 @@ RCT_EXPORT_VIEW_PROPERTY(radius, CGFloat)
2474@property (nonatomic, copy) NSString *behavior;
2474@property (nonatomic, copy) NSString *behavior;
2475@property (nonatomic, assign) CGFloat popoverWidth;
2475@property (nonatomic, assign) CGFloat popoverWidth;
2476@property (nonatomic, assign) CGFloat popoverHeight;
2476@property (nonatomic, assign) CGFloat popoverHeight;
2477+@property (nonatomic, assign) CGFloat popoverPadding;
2477@property (nonatomic, copy) RCTBubblingEventBlock onClose;
2478@property (nonatomic, copy) RCTBubblingEventBlock onClose;
2478@end
2479@end
2479
2480
@@ -2510,7 +2511,7 @@ RCT_EXPORT_VIEW_PROPERTY(radius, CGFloat)
2510 contentRect = CGRectUnion(contentRect, child.frame);
2511 contentRect = CGRectUnion(contentRect, child.frame);
2511 }
2512 }
2512 if (w <= 0) w = contentRect.size.width;
2513 if (w <= 0) w = contentRect.size.width;
2513− if (h <= 0) h = contentRect.size.height - 20;
2514+ if (h <= 0) h = contentRect.size.height - _popoverPadding;
2514 }
2515 }
2515 if (w < 20) w = 20;
2516 if (w < 20) w = 20;
2516 if (h < 10) h = 10;
2517 if (h < 10) h = 10;
@@ -2616,6 +2617,7 @@ RCT_EXPORT_VIEW_PROPERTY(preferredEdge, NSString)
2616RCT_EXPORT_VIEW_PROPERTY(behavior, NSString)
2617RCT_EXPORT_VIEW_PROPERTY(behavior, NSString)
2617RCT_EXPORT_VIEW_PROPERTY(popoverWidth, CGFloat)
2618RCT_EXPORT_VIEW_PROPERTY(popoverWidth, CGFloat)
2618RCT_EXPORT_VIEW_PROPERTY(popoverHeight, CGFloat)
2619RCT_EXPORT_VIEW_PROPERTY(popoverHeight, CGFloat)
2620+RCT_EXPORT_VIEW_PROPERTY(popoverPadding, CGFloat)
2619RCT_EXPORT_VIEW_PROPERTY(onClose, RCTBubblingEventBlock)
2621RCT_EXPORT_VIEW_PROPERTY(onClose, RCTBubblingEventBlock)
2620@end
2622@end
2621
2623
example-macos/src/Demo/Chat.purs+1
@@ -249,6 +249,7 @@ chatDemo = component "ChatDemo" \dp -> React.do
249 { visible: reactPopover == Just idx
249 { visible: reactPopover == Just idx
250 , preferredEdge: T.bottom
250 , preferredEdge: T.bottom
251 , behavior: T.transient
251 , behavior: T.transient
252+ , popoverPadding: 20.0
252 , onClose: setReactPopover Nothing
253 , onClose: setReactPopover Nothing
253 , style: Style.style { opacity: if showSmiley idx then 1.0 else 0.0 }
254 , style: Style.style { opacity: if showSmiley idx then 1.0 else 0.0 }
254 }
255 }
src/Yoga/React/Native/MacOS/Popover.purs+1
@@ -21,5 +21,6 @@ type NativePopoverAttributes = BaseAttributes
21 , behavior :: PopoverBehavior
21 , behavior :: PopoverBehavior
22 , popoverWidth :: Number
22 , popoverWidth :: Number
23 , popoverHeight :: Number
23 , popoverHeight :: Number
24+ , popoverPadding :: Number
24 , onClose :: Effect Unit
25 , onClose :: Effect Unit
25 )
26 )