Skip to content

Commit 1ff3fb3

Browse files
authored
use ColorValue for color props (#53)
1 parent fbff454 commit 1ff3fb3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

js/RNCSegmentedControlNativeComponent.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {requireNativeComponent} from 'react-native';
1414
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
1515
import type {SyntheticEvent} from 'react-native/Libraries/Types/CoreEventTypes';
1616
import type {NativeComponent} from 'react-native/Libraries/Renderer/shims/ReactNative';
17+
import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
1718

1819
type Event = SyntheticEvent<
1920
$ReadOnly<{|
@@ -50,22 +51,22 @@ export type SegmentedControlIOSProps = $ReadOnly<{|
5051
/**
5152
* Accent color of the control.
5253
*/
53-
tintColor?: ?string,
54+
tintColor?: ?ColorValue,
5455
/**
5556
* Text color of the control.
5657
* NOTE: this prop will only work for iOS >= 13
5758
*/
58-
textColor?: ?string,
59+
textColor?: ?ColorValue,
5960
/**
6061
* Text color of the control when selected.
6162
* NOTE: this prop will only work for iOS >= 13
6263
*/
63-
activeTextColor?: ?string,
64+
activeTextColor?: ?ColorValue,
6465
/**
6566
* Background color of the control.
6667
* NOTE: this prop will only work for iOS >= 13
6768
*/
68-
backgroundColor?: ?string,
69+
backgroundColor?: ?ColorValue,
6970
/**
7071
* If true, then selecting a segment won't persist visually.
7172
* The `onValueChange` callback will still work as expected.

0 commit comments

Comments
 (0)