jsketcher/modules/ui/components/controls/CheckboxControl.jsx
2018-06-12 23:11:30 -07:00

13 lines
371 B
JavaScript

import React from 'react';
import PropTypes from 'prop-types';
import InputControl from './InputControl';
export default class CheckboxControl extends React.Component {
render() {
let {onChange, initValue} = this.props;
return <input type='checkbox'
defaultValue={initValue}
onChange={e => onChange(e.target.value)} />
}
}