react-native-chonse-select

react native chonse select tabs horizontal

Usage no npm install needed!

<script type="module">
  import reactNativeChonseSelect from 'https://cdn.skypack.dev/react-native-chonse-select';
</script>

README

react-native-chonse-select

react native chonse select tab horizontal

Atom

Install

npm install --save react-native-chonse-select
yarn add react-native-chonse-select

Usage

Import library

import { ChonseSelect } from 'react-native-chonse-select';

Create data

const data = [
    {
        value:'0',
        label:'Male'
    },
    {
        value:'1',
        label:'Female'
    }
]

Render components

<ChonseSelect
    height={35}
    style={{ marginLeft: 20, marginBottom: 10 }}
    data={data}
    initValue={'0'}
    onPress={(item) => this.setState({ gender: item.value })}
/>

Proptypes

Props Description Default
data Initialize the item list none
initValue initialize the default data none