mirror of
https://github.com/maputnik/editor.git
synced 2026-07-05 21:47:35 +00:00
Add rudimentary boolean field
This commit is contained in:
@@ -5,6 +5,7 @@ import color from 'color'
|
||||
import GlSpec from 'mapbox-gl-style-spec/reference/latest.min.js'
|
||||
import NumberField from './number'
|
||||
import EnumField from './enum'
|
||||
import BooleanField from './boolean'
|
||||
import ColorField from './color'
|
||||
import StringField from './string'
|
||||
import inputStyle from './input.js'
|
||||
@@ -30,6 +31,7 @@ class ZoomSpecField extends React.Component {
|
||||
React.PropTypes.object,
|
||||
React.PropTypes.string,
|
||||
React.PropTypes.number,
|
||||
React.PropTypes.bool,
|
||||
]),
|
||||
}
|
||||
|
||||
@@ -122,6 +124,14 @@ class SpecField extends React.Component {
|
||||
doc={this.props.fieldSpec.doc}
|
||||
/>
|
||||
)
|
||||
case 'boolean': return (
|
||||
<BooleanField
|
||||
onChange={this.onValueChanged.bind(this, this.props.fieldName)}
|
||||
value={this.props.value}
|
||||
name={label}
|
||||
doc={this.props.fieldSpec.doc}
|
||||
/>
|
||||
)
|
||||
default: return null
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user