Skip to content

Commit a8154b1

Browse files
authored
Add labelStyle type for Picker.Item (#1759)
TypeScript currently warns that labelStyle is not a prop when used in Picker.Item, so this fixes that with the proper type
1 parent 3268333 commit a8154b1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

typings/components/Picker.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {ReactElement} from 'react';
2-
import {FlatListProps, GestureResponderEvent, LayoutChangeEvent} from 'react-native';
2+
import {FlatListProps, GestureResponderEvent, LayoutChangeEvent, StyleProp, TextStyle} from 'react-native';
33
import {BaseComponent} from '../commons';
44
import {TextFieldProps} from './Inputs';
55
import {TopBarProps} from './Modal';
@@ -21,6 +21,7 @@ export type PickerItemRenderItemFunc = (
2121

2222
export interface PickerItemProps {
2323
label?: string;
24+
labelStyle?: StyleProp<TextStyle>;
2425
value?: PickerItemValue;
2526
getItemLabel?: (value?: PickerItemValue) => string;
2627
isSelected?: boolean;

0 commit comments

Comments
 (0)