Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// import Option from 'uikit-react/Select/Option'
// import Value from 'uikit-react/Select/Value'
import { storiesOf, action } from '@kadira/storybook'
import { cloneElement, Component, PropTypes } from 'react'
import { Select } from 'uikit-react'
// This is to work around: https://github.com/kadirahq/react-storybook-addon-info/issues/26#issuecomment-229029177
Select.displayName = 'Select'
class Form extends Component {
static propTypes = {
children: PropTypes.node.isRequired,
defaultValue: PropTypes.any, // eslint-disable-line react/forbid-prop-types
}
static props = {
defaultValue: null,
}
state = {
value: this.props.defaultValue,
}
logChange = action('onChange')
handleChange = (value) => {
this.setState({ value })
this.logChange(value)