git.iko.soy/rowtype-yoga/purescript-yoga-react-native
on main help sign in
Fix docs pages to use correct API signatures from source
commit8c1f4cf476c1393e21af8eee798627a55d174748 authorMark <mark.eibes@gmail.com> dateMon 16 Feb 2026, 22:35 (7 months ago) parent15b97b1
9 files changed−31
README.md−1 docs/src/Docs/Pages/InputControls.purs−2 docs/src/Docs/Pages/QuickStart.purs−1 example-macos/macos/YogaReactExample-macOS/RCTMacOSControlsManager.m−8 example-macos/src/Demo/AiMl.purs−6 example-macos/src/Demo/Chat.purs−2 example-macos/src/Demo/InputControls.purs−2 example-macos/src/Demo/SystemServices.purs−8 src/Yoga/React/Native/MacOS/Button.purs−1
README.md−1
@@ -43,7 +43,6 @@ import Yoga.React.Native.MacOS.Types as T
4343myButton = nativeButton
4444 { title: "Click me"
4545 , bezelStyle: T.push
46− , sfSymbol: "star"
4746 , onPress: handler_ doSomething
4847 , style: Style.style { height: 24.0 }
4948 }
docs/src/Docs/Pages/InputControls.purs−2
@@ -30,12 +30,10 @@ button = L.componentDoc "nativeButton" "Yoga.React.Native.MacOS.Button (nativeBu
3030 """nativeButton
3131 { title: "Click me"
3232 , bezelStyle: T.push
33− , sfSymbol: "star.fill"
3433 , onPress: handler_ doSomething
3534 }"""
3635 [ propsTable
3736 [ { name: "title", type_: "String", description: "Button label text" }
38− , { name: "sfSymbol", type_: "String", description: "SF Symbol icon name" }
3937 , { name: "bezelStyle", type_: "BezelStyle", description: "push | toolbar | texturedSquare | inline" }
4038 , { name: "destructive", type_: "Boolean", description: "Red destructive styling" }
4139 , { name: "primary", type_: "Boolean", description: "Primary action button" }
docs/src/Docs/Pages/QuickStart.purs−1
@@ -57,7 +57,6 @@ import Yoga.React.Native.MacOS.Types as T
5757myButton = nativeButton
5858 { title: "Click me"
5959 , bezelStyle: T.push
60− , sfSymbol: "star"
6160 , onPress: handler_ doSomething
6261 , style: Style.style { height: 24.0 }
6362 }"""
example-macos/macos/YogaReactExample-macOS/RCTMacOSControlsManager.m−8
@@ -24,7 +24,6 @@
2424@property (nonatomic, strong) NSButton *button;
2525@property (nonatomic, copy) RCTBubblingEventBlock onPress;
2626@property (nonatomic, copy) NSString *title;
27−@property (nonatomic, copy) NSString *sfSymbol;
2827@property (nonatomic, copy) NSString *bezelStyle;
2928@property (nonatomic, assign) BOOL destructive;
3029@property (nonatomic, assign) BOOL primary;
@@ -52,12 +51,6 @@
5251 _button.title = title ?: @"";
5352}
5453
55−- (void)setSfSymbol:(NSString *)sfSymbol {
56− _sfSymbol = sfSymbol;
57− // SF symbols in push buttons aren't idiomatic macOS (HIG: title-only for push buttons).
58− // Kept as no-op for API compatibility; use toolbar-style buttons for icon-only.
59−}
60−
6154- (void)setBezelStyle:(NSString *)bezelStyle {
6255 _bezelStyle = bezelStyle;
6356 if ([bezelStyle isEqualToString:@"toolbar"]) _button.bezelStyle = NSBezelStyleToolbar;
@@ -94,7 +87,6 @@
9487RCT_EXPORT_MODULE(NativeButton)
9588- (NSView *)view { return [[RCTNativeButtonView alloc] initWithFrame:CGRectZero]; }
9689RCT_EXPORT_VIEW_PROPERTY(title, NSString)
97−RCT_EXPORT_VIEW_PROPERTY(sfSymbol, NSString)
9890RCT_EXPORT_VIEW_PROPERTY(bezelStyle, NSString)
9991RCT_EXPORT_VIEW_PROPERTY(destructive, BOOL)
10092RCT_EXPORT_VIEW_PROPERTY(primary, BOOL)
example-macos/src/Demo/AiMl.purs−6
@@ -67,14 +67,12 @@ speechRecognitionDemo = component "SpeechRecognitionDemo" \dp -> React.do
6767 , view { style: tw "flex-row items-center mb-2" }
6868 [ nativeButton
6969 { title: if speech.listening then "Listening..." else "Start"
70− , sfSymbol: if speech.listening then "mic.fill" else "mic"
7170 , bezelStyle: T.push
7271 , onPress: handler_ speech.start
7372 , style: Style.style { height: 24.0, width: 130.0 }
7473 }
7574 , nativeButton
7675 { title: "Stop"
77− , sfSymbol: "stop.circle"
7876 , bezelStyle: T.push
7977 , onPress: handler_ speech.stop
8078 , style: Style.style { height: 24.0, width: 80.0, marginLeft: 8.0 }
@@ -102,7 +100,6 @@ naturalLanguageDemo = component "NaturalLanguageDemo" \dp -> React.do
102100 , view { style: tw "flex-row items-center mb-2" }
103101 [ nativeButton
104102 { title: "Language"
105− , sfSymbol: "globe"
106103 , bezelStyle: T.push
107104 , onPress: handler_ $ launchAff_ do
108105 lang <- detectLanguage txt
@@ -111,7 +108,6 @@ naturalLanguageDemo = component "NaturalLanguageDemo" \dp -> React.do
111108 }
112109 , nativeButton
113110 { title: "Sentiment"
114− , sfSymbol: "face.smiling"
115111 , bezelStyle: T.push
116112 , onPress: handler_ $ launchAff_ do
117113 score <- analyzeSentiment txt
@@ -120,7 +116,6 @@ naturalLanguageDemo = component "NaturalLanguageDemo" \dp -> React.do
120116 }
121117 , nativeButton
122118 { title: "Tokenize"
123− , sfSymbol: "text.word.spacing"
124119 , bezelStyle: T.push
125120 , onPress: handler_ $ launchAff_ do
126121 tokens <- tokenize txt
@@ -142,7 +137,6 @@ cameraDemo = component "CameraDemo" \dp -> React.do
142137 [ text { style: tw "text-sm font-semibold mr-3" <> Style.style { color: dp.fg } } "Camera"
143138 , nativeButton
144139 { title: if on then "Stop" else "Start"
145− , sfSymbol: if on then "video.slash" else "video"
146140 , bezelStyle: T.push
147141 , onPress: handler_ (setOn (not on))
148142 , style: Style.style { height: 24.0, width: 100.0 }
example-macos/src/Demo/Chat.purs−2
@@ -189,7 +189,6 @@ chatDemo = component "ChatDemo" \dp -> React.do
189189 , nativeButton
190190 { title: ""
191191 , bezelStyle: T.toolbar
192− , sfSymbol: ""
193192 , onPress: handler_ (selectRoom r.roomId)
194193 , style: Style.style { position: "absolute", top: 0.0, left: 0.0, right: 0.0, bottom: 0.0, opacity: 0.0 }
195194 }
@@ -368,7 +367,6 @@ chatDemo = component "ChatDemo" \dp -> React.do
368367 }
369368 , nativeButton
370369 { title: ""
371− , sfSymbol: "paperplane.fill"
372370 , bezelStyle: T.toolbar
373371 , onPress: handler_ (sendMessage rid inputText)
374372 , style: Style.style { height: 28.0, width: 36.0, marginLeft: 8.0 }
example-macos/src/Demo/InputControls.purs−2
@@ -50,7 +50,6 @@ buttonDemo = component "ButtonDemo" \dp -> React.do
5050 [ view { style: tw "flex-row items-center" }
5151 [ nativeButton
5252 { title: "Say Hello"
53− , sfSymbol: "hand.wave"
5453 , bezelStyle: T.push
5554 , primary: true
5655 , onPress: handler_ (setStatus "Hello from PureScript!")
@@ -58,7 +57,6 @@ buttonDemo = component "ButtonDemo" \dp -> React.do
5857 }
5958 , nativeButton
6059 { title: "Reset"
61− , sfSymbol: "arrow.counterclockwise"
6260 , bezelStyle: T.push
6361 , onPress: handler_ (setStatus "Ready")
6462 , style: Style.style { height: 24.0, width: 100.0, marginLeft: 8.0 }
example-macos/src/Demo/SystemServices.purs−8
@@ -56,7 +56,6 @@ shareDemo = component "ShareDemo" \dp -> pure do
5656 , desc dp "System share picker"
5757 , nativeButton
5858 { title: "Share Text"
59− , sfSymbol: "square.and.arrow.up"
6059 , bezelStyle: T.push
6160 , onPress: handler_ (macosShare [ "Hello from PureScript React Native!" ])
6261 , style: Style.style { height: 24.0, width: 120.0 } <> tw "mb-2"
@@ -70,7 +69,6 @@ notificationsDemo = component "NotificationsDemo" \dp -> pure do
7069 , desc dp "System notifications (requires permission)"
7170 , nativeButton
7271 { title: "Send Notification"
73− , sfSymbol: "bell"
7472 , bezelStyle: T.push
7573 , onPress: handler_ (macosNotify "PureScript" "Hello from React Native macOS!")
7674 , style: Style.style { height: 24.0, width: 160.0 } <> tw "mb-2"
@@ -114,7 +112,6 @@ statusBarDemo = component "StatusBarDemo" \dp -> React.do
114112 , view { style: tw "flex-row items-center mb-4" }
115113 [ nativeButton
116114 { title: if active then "Remove" else "Add to Menu Bar"
117− , sfSymbol: if active then "minus.circle" else "plus.circle"
118115 , bezelStyle: T.push
119116 , onPress: handler_
120117 ( if active then do
@@ -145,7 +142,6 @@ quickLookDemo = component "QuickLookDemo" \dp -> pure do
145142 , view { style: tw "flex-row items-center mb-4" }
146143 [ nativeButton
147144 { title: "Preview /etc/hosts"
148− , sfSymbol: "eye"
149145 , bezelStyle: T.push
150146 , onPress: handler_ (macosQuickLook "/etc/hosts")
151147 , style: Style.style { height: 24.0, width: 180.0 }
@@ -161,7 +157,6 @@ colorPanelDemo = component "ColorPanelDemo" \dp -> pure do
161157 , view { style: tw "flex-row items-center mb-4" }
162158 [ nativeButton
163159 { title: "Show Color Panel"
164− , sfSymbol: "paintpalette"
165160 , bezelStyle: T.push
166161 , onPress: handler_ macosShowColorPanel
167162 , style: Style.style { height: 24.0, width: 180.0 }
@@ -177,7 +172,6 @@ fontPanelDemo = component "FontPanelDemo" \dp -> pure do
177172 , view { style: tw "flex-row items-center mb-4" }
178173 [ nativeButton
179174 { title: "Show Font Panel"
180− , sfSymbol: "textformat"
181175 , bezelStyle: T.push
182176 , onPress: handler_ macosShowFontPanel
183177 , style: Style.style { height: 24.0, width: 180.0 }
@@ -201,14 +195,12 @@ speechDemo = component "SpeechDemo" \dp -> React.do
201195 , view { style: tw "flex-row items-center mb-4" }
202196 [ nativeButton
203197 { title: "Speak"
204− , sfSymbol: "speaker.wave.2"
205198 , bezelStyle: T.push
206199 , onPress: handler_ (say txt)
207200 , style: Style.style { height: 24.0, width: 100.0 }
208201 }
209202 , nativeButton
210203 { title: "Stop"
211− , sfSymbol: "stop.circle"
212204 , bezelStyle: T.push
213205 , onPress: handler_ stopSpeaking
214206 , style: Style.style { height: 24.0, width: 100.0, marginLeft: 8.0 }
src/Yoga/React/Native/MacOS/Button.purs−1
@@ -13,7 +13,6 @@ nativeButton = createNativeElement_ buttonImpl
1313
1414type NativeButtonAttributes = BaseAttributes
1515 ( title :: String
16− , sfSymbol :: String
1716 , bezelStyle :: BezelStyle
1817 , destructive :: Boolean
1918 , primary :: Boolean