Skip to content

Latest commit

 

History

History
42 lines (39 loc) · 1 KB

README.md

File metadata and controls

42 lines (39 loc) · 1 KB

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