Skip to content

Commit 2f67c42

Browse files
committed
rename to activeTextColor
1 parent 8a2f247 commit 2f67c42

4 files changed

+8
-6
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ type SegmentedControlIOSProps = $ReadOnly<{|
112112
* Text color of the control.
113113
*/
114114
textColor?: ?string,
115+
/**
116+
* Text color of the control when selected.
117+
* NOTE: this prop will only work for iOS >= 13
118+
*/
119+
activeTextColor?: ?string,
115120
/**
116121
* (For iOS >= 13)
117122
* Background color of the control.

ios/RNCSegmentedControl.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ - (void)setTextColor:(UIColor *)textColor
6060
#endif
6161
}
6262

63-
- (void)setSelectedTextColor:(UIColor *)textColor
63+
- (void)setActiveTextColor:(UIColor *)textColor
6464
{
6565
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_13_0) && \
6666
__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0

ios/RNCSegmentedControlManager.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ - (UIView *)view
2525
RCT_EXPORT_VIEW_PROPERTY(tintColor, UIColor)
2626
RCT_EXPORT_VIEW_PROPERTY(backgroundColor, UIColor)
2727
RCT_EXPORT_VIEW_PROPERTY(textColor, UIColor)
28-
RCT_EXPORT_VIEW_PROPERTY(selectedTextColor, UIColor)
28+
RCT_EXPORT_VIEW_PROPERTY(activeTextColor, UIColor)
2929
RCT_EXPORT_VIEW_PROPERTY(momentary, BOOL)
3030
RCT_EXPORT_VIEW_PROPERTY(enabled, BOOL)
3131
RCT_EXPORT_VIEW_PROPERTY(onChange, RCTBubblingEventBlock)

js/RNCSegmentedControlNativeComponent.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,20 @@ export type SegmentedControlIOSProps = $ReadOnly<{|
5252
*/
5353
tintColor?: ?string,
5454
/**
55-
*
5655
* Text color of the control.
5756
* NOTE: this prop will only work for iOS >= 13
5857
*/
5958
textColor?: ?string,
6059
/**
61-
*
6260
* Text color of the control when selected.
6361
* NOTE: this prop will only work for iOS >= 13
6462
*/
65-
selectedTextColor?: ?string,
63+
activeTextColor?: ?string,
6664
/**
6765
* Background color of the control.
6866
* NOTE: this prop will only work for iOS >= 13
6967
*/
7068
backgroundColor?: ?string,
71-
/**
7269
/**
7370
* If true, then selecting a segment won't persist visually.
7471
* The `onValueChange` callback will still work as expected.

0 commit comments

Comments
 (0)