a simple drop down component
npm install react-drop-down --save
import Dropdown from 'react-drop-down'
import ReactDOM from 'react-dom'
import React, { Component, PropTypes } from 'react'
class TestComponent extends Component {
constructor(props) {
super(props)
this.state = { value: 'reactjs' }
}
handleChange(e) {
this.setState({ value: e })
console.log(e)
}
render() {
return (
<div>
<Dropdown
value={this.state.value}
onChange={this.handleChange.bind(this)}
options={['reactjs', 'angular2']}
/>
</div>
)
}
}
ReactDOM.render(<TestComponent />, document.getElementById('root'))
yarn
yarn dev
yarn test
yarn
yarn build
npm login
npm version patch
git add -A
git push origin master
npm publish