@@ -6,7 +6,7 @@ import Animated, {useSharedValue, useAnimatedScrollHandler} from 'react-native-r
6
6
import { Colors , Spacings } from 'style' ;
7
7
import { Constants , asBaseComponent } from '../../commons/new' ;
8
8
import View from '../../components/view' ;
9
- import Fader , { FaderPosition } from '../../components/fader' ;
9
+ import Fader , { FaderPosition , FaderProps } from '../../components/fader' ;
10
10
import Item , { ItemProps } from './Item' ;
11
11
import Text , { TextProps } from '../../components/text' ;
12
12
import usePresenter from './usePresenter' ;
@@ -78,6 +78,10 @@ export interface WheelPickerProps {
78
78
*/
79
79
separatorsStyle ?: ViewStyle ;
80
80
testID ?: string ;
81
+ /**
82
+ * Change the default (white) tint color of the fade view.
83
+ */
84
+ faderProps ?: Omit < FaderProps , 'visible' | 'position' > ;
81
85
}
82
86
83
87
const WheelPicker = ( {
@@ -96,7 +100,8 @@ const WheelPicker = ({
96
100
children,
97
101
initialValue = 0 ,
98
102
separatorsStyle,
99
- testID
103
+ testID,
104
+ faderProps
100
105
} : WheelPickerProps ) => {
101
106
const scrollView = useRef < Animated . ScrollView > ( ) ;
102
107
const offset = useSharedValue ( 0 ) ;
@@ -242,7 +247,7 @@ const WheelPicker = ({
242
247
} , [ flatListWidth , labelContainerStyle , label , labelProps , activeTextColor , labelStyle ] ) ;
243
248
244
249
const fader = useMemo ( ( ) => ( position : FaderPosition ) => {
245
- return < Fader visible position = { position } size = { 60 } /> ;
250
+ return < Fader visible position = { position } size = { 60 } { ... faderProps } /> ;
246
251
} ,
247
252
[ ] ) ;
248
253
0 commit comments