@schibstedspain/react-form-select
v1.6.0
Published
> Wrapper around a select html element that gives a consistent look'n'feel across devices yet keeping the native functionality on being used.
Downloads
27
Readme
FormSelect
Wrapper around a select html element that gives a consistent look'n'feel across devices yet keeping the native functionality on being used.
Installation
$ npm install @schibstedspain/react-form-select --save
Usage
Basic usage
import FormSelect from '@schibstedspain/react-form-select'
const OPTIONS = [
{ key: 'default', value: '', content: '--Please choose an option--' },
{ key: 'dog', value: 'dog', content: 'Dog' },
{ key: 'cat', value: 'cat', content: 'Cat' },
{ key: 'hamster', value: 'hamster', content: 'Hamster' },
{ key: 'parrot', value: 'parrot', content: 'Parrot' }
]
return (
<FormSelect
options={OPTIONS}
onChange={(e, data) => console.log(data)}
/>
)
@import '~@schibstedspain/react-form-select/lib/index';
Find full description and more examples in the demo page.