react-basic-dropdown
v0.1.2
Published
Very basic and primitive dropdown
Downloads
6
Maintainers
Readme
React Basic Dropdown
The minimal and simple React dropdown.
Installation
yarn add react-basic-dropdown
or
npm install react-basic-dropdown --save
Basic Usage
import Select from 'react-basic-dropdown'
// to have default stylesheets. Optional
import 'react-basic-dropdown/dist/styles.css'
class Example extends Component {
handleValueChange(option) {
console.log('change', option)
}
render() {
const options = [
{ label: 'Option 1', value: 1 },
{ label: 'Another option', value: 2 },
]
return (
<Select
value={2}
options={options}
onChange={this.handleValueChange}
/>
)
}
}
TODO:
- This readme
- More configuration options