diff --git a/README.md b/README.md index b5592c81..cd5bcdf9 100644 --- a/README.md +++ b/README.md @@ -234,6 +234,15 @@ An object container Extends [ViewStyles](https://reactnative.dev/docs/view-style-props) +### `sliderStyle` + +(Android and Web only) Styles the slider component (Animated.View) +| Type | Required | Platform | +| ------ | -------- | -------- | +| object | No | Android, Web | + +Extends [ViewStyles](https://reactnative.dev/docs/view-style-props) + ## Tips and Tricks ### How can I increase the height of the tab ? diff --git a/index.d.ts b/index.d.ts index b9144779..5027bb93 100644 --- a/index.d.ts +++ b/index.d.ts @@ -110,6 +110,11 @@ export interface SegmentedControlProps extends ViewProps { * Touchable style properties for Segmented Control Tab */ tabStyle?: ViewStyle; + + /** + * Style properties for the Animated.View component + */ + sliderStyle?: ViewStyle; } /** diff --git a/js/SegmentedControl.js b/js/SegmentedControl.js index d82ecb5f..0ac4d634 100644 --- a/js/SegmentedControl.js +++ b/js/SegmentedControl.js @@ -36,6 +36,7 @@ const SegmentedControl = ({ fontStyle, activeFontStyle, appearance, + sliderStyle, }: SegmentedControlProps): React.Node => { const colorSchemeHook = useColorScheme(); const colorScheme = appearance || colorSchemeHook; @@ -117,6 +118,7 @@ const SegmentedControl = ({ ;