2.1.0 âĸ Published 1 year ago
react-native-pro-picker v2.1.0
Install đ§°
You can install react-native-pro-picker by running the following command
npm install react-native-pro-picker
Usage đĄ
- Add the following import statement:
import { ProPicker, ProPickerOption, ProPickerOptionItem } from 'react-native-pro-picker';
- Add the component:
<ProPicker onItemSelected={(item) => {
// Use the selected item.
}}/>
- Add the component:
<ProPicker onItemSelected={(item) => {
<ProPickerOptionItem id={1} value={'js'} label={"Javascript"}/>
<ProPickerOptionItem id={2} value={'ts'} label={"Typescript"}/>
<ProPickerOptionItem id={3} value={'kt'} label={"Kotlin"}/>
<ProPickerOptionItem id={4} value={'sw'} label={"Swift"}/>
}}/>
- Customize your picker with the customization options.
Necessary Attributes â ī¸
Attribute | Description | Type |
---|---|---|
children | The options to select from. Should be of type ProPickerOptionItem | ProPickerOptionItem | ProPickerOptionItem[] |
onItemSelected | Callback for when the user selects an item. | () => void |
Customizable Attributes đšī¸
Try it yourself đą
Download the repo and do:
cd example-app/
npm run start
Contributing đ°
If you want me to improve this package, feel free to reach out to me, and I'll gladly update it.
Maintainers đˇ
License âī¸
MIT