mirror of
https://github.com/maputnik/editor.git
synced 2026-08-24 22:17:25 +00:00
Add color field
This commit is contained in:
@@ -3,6 +3,7 @@ import Immutable from 'immutable'
|
||||
import GlSpec from 'mapbox-gl-style-spec/reference/latest.min.js'
|
||||
import NumberField from './number'
|
||||
import EnumField from './enum'
|
||||
import ColorField from './color'
|
||||
|
||||
class SpecField extends React.Component {
|
||||
static propTypes = {
|
||||
@@ -36,6 +37,13 @@ class SpecField extends React.Component {
|
||||
doc={this.props.fieldSpec.doc}
|
||||
/>
|
||||
)
|
||||
case 'color': return (
|
||||
<ColorField
|
||||
value={this.props.value}
|
||||
name={this.props.fieldName}
|
||||
doc={this.props.fieldSpec.doc}
|
||||
/>
|
||||
)
|
||||
default: return null
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user