@@ -24,6 +24,7 @@
2424@property (nonatomic, strong) NSButton *button;
2525@property (nonatomic, copy) RCTBubblingEventBlock onPress;
2626@property (nonatomic, copy) NSString *title;
27+@property (nonatomic, copy) NSString *sfSymbol;
2728@property (nonatomic, copy) NSString *bezelStyle;
2829@property (nonatomic, assign) BOOL destructive;
2930@property (nonatomic, assign) BOOL primary;
@@ -48,7 +49,28 @@
4849
4950- (void)setTitle:(NSString *)title {
5051 _title = title;
51− _button.title = title ?: @"";
52+ if (title.length > 0) {
53+ _button.image = nil;
54+ _button.title = title;
55+ } else {
56+ _button.title = @"";
57+ }
58+}
59+
60+- (void)setSfSymbol:(NSString *)sfSymbol {
61+ _sfSymbol = sfSymbol;
62+ if (sfSymbol.length > 0) {
63+ NSImage *img = [NSImage imageWithSystemSymbolName:sfSymbol accessibilityDescription:sfSymbol];
64+ if (img) {
65+ _button.image = img;
66+ _button.title = @"";
67+ _button.imagePosition = NSImageOnly;
68+ }
69+ } else {
70+ _button.image = nil;
71+ _button.title = _title ?: @"";
72+ _button.imagePosition = NSNoImage;
73+ }
5274}
5375
5476- (void)setBezelStyle:(NSString *)bezelStyle {
@@ -87,6 +109,7 @@
87109RCT_EXPORT_MODULE(NativeButton)
88110- (NSView *)view { return [[RCTNativeButtonView alloc] initWithFrame:CGRectZero]; }
89111RCT_EXPORT_VIEW_PROPERTY(title, NSString)
112+RCT_EXPORT_VIEW_PROPERTY(sfSymbol, NSString)
90113RCT_EXPORT_VIEW_PROPERTY(bezelStyle, NSString)
91114RCT_EXPORT_VIEW_PROPERTY(destructive, BOOL)
92115RCT_EXPORT_VIEW_PROPERTY(primary, BOOL)