File tree Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,15 @@ An object container
241241
242242Extends [ ViewStyles] ( https://reactnative.dev/docs/view-style-props )
243243
244+ ### ` sliderStyle `
245+
246+ (Android and Web only) Styles the slider component (Animated.View)
247+ | Type | Required | Platform |
248+ | ------ | -------- | -------- |
249+ | object | No | Android, Web |
250+
251+ Extends [ ViewStyles] ( https://reactnative.dev/docs/view-style-props )
252+
244253## Tips and Tricks
245254
246255### How can I increase the height of the tab ?
Original file line number Diff line number Diff line change @@ -111,6 +111,11 @@ export interface SegmentedControlProps extends ViewProps {
111111 * Touchable style properties for Segmented Control Tab
112112 */
113113 tabStyle ?: ViewStyle ;
114+
115+ /**
116+ * Style properties for the Animated.View component
117+ */
118+ sliderStyle ?: ViewStyle ;
114119}
115120
116121/**
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ const SegmentedControl = ({
3838 appearance,
3939 accessibilityHintSeperator = 'out of' ,
4040 testIDS,
41+ sliderStyle,
4142} : SegmentedControlProps ) : React . Node => {
4243 const colorSchemeHook = useColorScheme ( ) ;
4344 const colorScheme = appearance || colorSchemeHook ;
@@ -118,6 +119,7 @@ const SegmentedControl = ({
118119 backgroundColor :
119120 tintColor || ( colorScheme === 'dark' ? '#636366' : 'white' ) ,
120121 } ,
122+ sliderStyle ,
121123 ] }
122124 />
123125 ) : null }
Original file line number Diff line number Diff line change @@ -112,4 +112,8 @@ export type SegmentedControlProps = $ReadOnly<{|
112112 * array testID to each segment button
113113 */
114114 testIDS : $ReadOnlyArray < string > ,
115+ /**
116+ * Style properties for the slider component (Animated.View)
117+ */
118+ sliderStyle ?: ViewStyle ,
115119| } > ;
You can’t perform that action at this time.
0 commit comments