Add color field

This commit is contained in:
lukasmartinelli
2016-09-12 19:47:28 +02:00
parent 957d805ab8
commit 4d1609a826
4 changed files with 31 additions and 2 deletions
+8
View File
@@ -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
}
}