File tree 4 files changed +21
-0
lines changed
4 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,15 @@ An object container
234
234
235
235
Extends [ ViewStyles] ( https://reactnative.dev/docs/view-style-props )
236
236
237
+ ### ` sliderStyle `
238
+
239
+ (Android and Web only) Styles the slider component (Animated.View)
240
+ | Type | Required | Platform |
241
+ | ------ | -------- | -------- |
242
+ | object | No | Android, Web |
243
+
244
+ Extends [ ViewStyles] ( https://reactnative.dev/docs/view-style-props )
245
+
237
246
## Tips and Tricks
238
247
239
248
### How can I increase the height of the tab ?
Original file line number Diff line number Diff line change @@ -110,6 +110,11 @@ export interface SegmentedControlProps extends ViewProps {
110
110
* Touchable style properties for Segmented Control Tab
111
111
*/
112
112
tabStyle ?: ViewStyle ;
113
+
114
+ /**
115
+ * Style properties for the Animated.View component
116
+ */
117
+ sliderStyle ?: ViewStyle ;
113
118
}
114
119
115
120
/**
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ const SegmentedControl = ({
36
36
fontStyle,
37
37
activeFontStyle,
38
38
appearance,
39
+ sliderStyle,
39
40
} : SegmentedControlProps ) : React . Node => {
40
41
const colorSchemeHook = useColorScheme ( ) ;
41
42
const colorScheme = appearance || colorSchemeHook ;
@@ -117,6 +118,7 @@ const SegmentedControl = ({
117
118
< Animated . View
118
119
style = { [
119
120
styles . slider ,
121
+ sliderStyle ,
120
122
{
121
123
transform : [ { translateX : animation } ] ,
122
124
width : segmentWidth - 4 ,
Original file line number Diff line number Diff line change @@ -107,4 +107,9 @@ export type SegmentedControlProps = $ReadOnly<{|
107
107
* Touchable style properties for Segmented Control Tab
108
108
*/
109
109
tabStyle ?: ViewStyle ,
110
+
111
+ /**
112
+ * Style properties for the slider component (Animated.View)
113
+ */
114
+ sliderStyle ?: ViewStyle ,
110
115
| } > ;
You can’t perform that action at this time.
0 commit comments