mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-14 17:23:26 +01:00
Merge pull request #621 from orangemug/fix/CheckboxInput-props-error
Added default to <CheckboxInput/> value to fix warning in console.
This commit is contained in:
commit
d1f6bc95db
2 changed files with 7 additions and 3 deletions
|
@ -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
|
||||||
|
|
|
@ -80,7 +80,7 @@ class ExportModal extends React.Component {
|
||||||
Download a JSON style to your computer.
|
Download a JSON style to your computer.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<div>
|
||||||
<InputBlock
|
<InputBlock
|
||||||
label={fieldSpecAdditional.maputnik.mapbox_access_token.label}
|
label={fieldSpecAdditional.maputnik.mapbox_access_token.label}
|
||||||
fieldSpec={fieldSpecAdditional.maputnik.mapbox_access_token}
|
fieldSpec={fieldSpecAdditional.maputnik.mapbox_access_token}
|
||||||
|
@ -108,7 +108,7 @@ class ExportModal extends React.Component {
|
||||||
onChange={this.changeMetadataProperty.bind(this, "maputnik:thunderforest_access_token")}
|
onChange={this.changeMetadataProperty.bind(this, "maputnik:thunderforest_access_token")}
|
||||||
/>
|
/>
|
||||||
</InputBlock>
|
</InputBlock>
|
||||||
</p>
|
</div>
|
||||||
|
|
||||||
<Button onClick={this.downloadStyle.bind(this)}>
|
<Button onClick={this.downloadStyle.bind(this)}>
|
||||||
<MdFileDownload />
|
<MdFileDownload />
|
||||||
|
|
Loading…
Reference in a new issue