Added default to <CheckboxInput/> value to fix warning in console.

This commit is contained in:
orangemug 2020-02-22 18:39:24 +00:00
parent 5be7e0c7ec
commit 4b8800e8ac

View file

@ -3,11 +3,15 @@ import PropTypes from 'prop-types'
class CheckboxInput extends React.Component { class CheckboxInput extends React.Component {
static propTypes = { static propTypes = {
value: PropTypes.bool.isRequired, value: PropTypes.bool,
style: PropTypes.object, style: PropTypes.object,
onChange: PropTypes.func, onChange: PropTypes.func,
} }
static defaultProps = {
value: false,
}
render() { render() {
return <label className="maputnik-checkbox-wrapper"> return <label className="maputnik-checkbox-wrapper">
<input <input