Skip to content

Commit 7bf3f42

Browse files
authored
add separatorsStyle prop to WheelPicker (#1906)
1 parent 463b7b3 commit 7bf3f42

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

generatedTypes/src/incubator/WheelPicker/index.d.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,16 @@ export interface WheelPickerProps {
6262
* Align the content to center, right ot left (default: center)
6363
*/
6464
align?: WheelPickerAlign;
65+
/**
66+
* Extra style for the separators
67+
*/
68+
separatorsStyle?: ViewStyle;
6569
testID?: string;
6670
}
6771
declare const _default: React.ComponentClass<WheelPickerProps & {
6872
useCustomTheme?: boolean | undefined;
6973
}, any> & {
70-
({ items: propItems, itemHeight, numberOfVisibleRows, activeTextColor, inactiveTextColor, textStyle, label, labelStyle, labelProps, onChange, align, style, children, initialValue, testID }: WheelPickerProps): JSX.Element;
74+
({ items: propItems, itemHeight, numberOfVisibleRows, activeTextColor, inactiveTextColor, textStyle, label, labelStyle, labelProps, onChange, align, style, children, initialValue, separatorsStyle, testID }: WheelPickerProps): JSX.Element;
7175
alignments: typeof WheelPickerAlign;
7276
displayName: string;
7377
};

src/incubator/WheelPicker/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ export interface WheelPickerProps {
7373
* Align the content to center, right ot left (default: center)
7474
*/
7575
align?: WheelPickerAlign;
76+
/**
77+
* Extra style for the separators
78+
*/
79+
separatorsStyle?: ViewStyle;
7680
testID?: string;
7781
}
7882

@@ -91,6 +95,7 @@ const WheelPicker = ({
9195
style,
9296
children,
9397
initialValue = 0,
98+
separatorsStyle,
9499
testID
95100
}: WheelPickerProps) => {
96101
const scrollView = useRef<Animated.ScrollView>();
@@ -244,7 +249,7 @@ const WheelPicker = ({
244249
const separators = useMemo(() => {
245250
return (
246251
<View absF centerV pointerEvents="none">
247-
<View style={styles.separators}/>
252+
<View style={[styles.separators, separatorsStyle]}/>
248253
</View>
249254
);
250255
}, []);

src/incubator/WheelPicker/wheelPicker.api.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
"description": "Align the content to center, right ot left",
3333
"default": "center"
3434
},
35-
{"name": "testID", "type": "string", "description": "Align the content to center, right ot left"}
35+
{"name": "separatorsStyle", "type": "ViewStyle", "description": "Extra style for the separators"},
36+
{"name": "testID", "type": "string", "description": "test identifier"}
3637
],
3738
"snippet": [
3839
"<WheelPicker",

0 commit comments

Comments
 (0)