git.iko.soy/rowtype-yoga/purescript-yoga-react-native
on main help sign in
commit69285c16f540c998c47cc2e9ab22f32078fba713 authorMark <mark.eibes@gmail.com> dateThu 19 Feb 2026, 13:21 (7 months ago) parent01b8e59
3 files changed+5−1
example-macos/macos/YogaReactExample-macOS/RCTMacOSControlsManager.m+3−1 example-macos/src/Demo/Chat.purs+1 src/Yoga/React/Native/MacOS/Popover.purs+1
example-macos/macos/YogaReactExample-macOS/RCTMacOSControlsManager.m+3−1
@@ -2474,6 +2474,7 @@ RCT_EXPORT_VIEW_PROPERTY(radius, CGFloat)
24742474@property (nonatomic, copy) NSString *behavior;
24752475@property (nonatomic, assign) CGFloat popoverWidth;
24762476@property (nonatomic, assign) CGFloat popoverHeight;
2477+@property (nonatomic, assign) CGFloat popoverPadding;
24772478@property (nonatomic, copy) RCTBubblingEventBlock onClose;
24782479@end
24792480
@@ -2510,7 +2511,7 @@ RCT_EXPORT_VIEW_PROPERTY(radius, CGFloat)
25102511 contentRect = CGRectUnion(contentRect, child.frame);
25112512 }
25122513 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;
25142515 }
25152516 if (w < 20) w = 20;
25162517 if (h < 10) h = 10;
@@ -2616,6 +2617,7 @@ RCT_EXPORT_VIEW_PROPERTY(preferredEdge, NSString)
26162617RCT_EXPORT_VIEW_PROPERTY(behavior, NSString)
26172618RCT_EXPORT_VIEW_PROPERTY(popoverWidth, CGFloat)
26182619RCT_EXPORT_VIEW_PROPERTY(popoverHeight, CGFloat)
2620+RCT_EXPORT_VIEW_PROPERTY(popoverPadding, CGFloat)
26192621RCT_EXPORT_VIEW_PROPERTY(onClose, RCTBubblingEventBlock)
26202622@end
26212623
example-macos/src/Demo/Chat.purs+1
@@ -249,6 +249,7 @@ chatDemo = component "ChatDemo" \dp -> React.do
249249 { visible: reactPopover == Just idx
250250 , preferredEdge: T.bottom
251251 , behavior: T.transient
252+ , popoverPadding: 20.0
252253 , onClose: setReactPopover Nothing
253254 , style: Style.style { opacity: if showSmiley idx then 1.0 else 0.0 }
254255 }
src/Yoga/React/Native/MacOS/Popover.purs+1
@@ -21,5 +21,6 @@ type NativePopoverAttributes = BaseAttributes
2121 , behavior :: PopoverBehavior
2222 , popoverWidth :: Number
2323 , popoverHeight :: Number
24+ , popoverPadding :: Number
2425 , onClose :: Effect Unit
2526 )