1.0.21 • Published 4 years ago
react-native-modal-picker-x v1.0.21
React Native Modal Picker X
Author: Alexandre Louisnard alouisnard@gmail.com
React Native JS NPM module
2019
DESCRIPTION
A Modal Picker for React Native, rendering correctly on both iOS and Android.
USAGE
Installation
npm install --save react-native-modal-picker-x
JSX
<ModalPicker
items={[
{
label: 'A',
value: 'A'
},
{
label: 'B',
value: 'B'
},
{
label: 'C',
value: 'C'
}
]}
selectedValue={this.state.pickerModalValue}
onValueChange={({ label, value }) => {
this.setState({ pickerModalValue: value });
return true;
}}
iosModalButtonTitleStyle={{ color: 'blue' }}
iosModalItemStyle={{ fontSize: 14, textAlign: 'left' }}
iosOkButtonText={'OK'}
iosCancelButtonText={'Annuler'} />
Props
type DataItem = { label: ?string, value: ?string };
type Props = {
items: DataItem[],
selectedValue?: ?string,
onValueChange?: ?(item: DataItem) => boolean, // must return true to confirm the value change, false otherwise
disabled?: boolean,
containerStyle?: {},
iosModalButtonStyle?: {},
iosModalButtonTitleStyle?: {},
iosModalItemStyle?: {},
iosOkButtonText?: string,
iosCancelButtonText?: string,
};
static defaultProps = {
selectedValue: null,
onValueChange: null,
disabled: false,
containerStyle: {},
iosModalButtonStyle: {},
iosModalButtonTitleStyle: {},
iosModalItemStyle: {},
iosOkButtonText: 'OK',
iosCancelButtonText: 'CANCEL',
};
CHANGELOG
BACKLOG
1.0.21
4 years ago
1.0.20
4 years ago
1.0.19
5 years ago
1.0.18
5 years ago
1.0.17
5 years ago
1.0.16
5 years ago
1.0.15
5 years ago
1.0.14
5 years ago
1.0.13
5 years ago
1.0.12
5 years ago
1.0.11
5 years ago
1.0.10
5 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago