@@ -5,13 +5,13 @@ import {useSharedValue, useAnimatedStyle, runOnJS, useAnimatedReaction, withTimi
55import { forwardRef , ForwardRefInjectedProps , Constants } from '../../commons/new' ;
66import { extractAccessibilityProps } from '../../commons/modifiers' ;
77import { Colors , Spacings } from '../../style' ;
8+ import { StyleUtils } from 'utils' ;
89import View from '../../components/view' ;
910import { SliderProps } from '../../components/slider' ;
1011import {
1112 validateValues ,
1213 getOffsetForValue ,
1314 getValueForOffset ,
14- unpackStyle ,
1515 getStepInterpolated
1616} from './SliderPresenter' ;
1717import Thumb from './Thumb' ;
@@ -99,12 +99,12 @@ const Slider = React.memo((props: Props) => {
9999 const defaultThumbStyle : StyleProp < ViewStyle > = useMemo ( ( ) => [
100100 styles . thumb , { backgroundColor : disabled ? Colors . $backgroundDisabled : thumbTintColor }
101101 ] , [ disabled , thumbTintColor ] ) ;
102- const _thumbStyle = useSharedValue ( unpackStyle ( thumbStyle || defaultThumbStyle ) ) ;
103- const _activeThumbStyle = useSharedValue ( unpackStyle ( activeThumbStyle ) ) ;
102+ const _thumbStyle = useSharedValue ( StyleUtils . unpackStyle ( thumbStyle || defaultThumbStyle , { flatten : true } ) ) ;
103+ const _activeThumbStyle = useSharedValue ( StyleUtils . unpackStyle ( activeThumbStyle , { flatten : true } ) ) ;
104104
105105 useEffect ( ( ) => {
106106 if ( ! thumbStyle ) {
107- _thumbStyle . value = unpackStyle ( defaultThumbStyle ) ;
107+ _thumbStyle . value = StyleUtils . unpackStyle ( defaultThumbStyle , { flatten : true } ) ;
108108 }
109109 // eslint-disable-next-line react-hooks/exhaustive-deps
110110 } , [ defaultThumbStyle , thumbStyle ] ) ;
0 commit comments