Add string field

This commit is contained in:
lukasmartinelli
2016-09-12 19:54:02 +02:00
parent 4d1609a826
commit 885e31111c
3 changed files with 31 additions and 0 deletions
+8
View File
@@ -4,6 +4,7 @@ import GlSpec from 'mapbox-gl-style-spec/reference/latest.min.js'
import NumberField from './number'
import EnumField from './enum'
import ColorField from './color'
import StringField from './string'
class SpecField extends React.Component {
static propTypes = {
@@ -37,6 +38,13 @@ class SpecField extends React.Component {
doc={this.props.fieldSpec.doc}
/>
)
case 'string': return (
<StringField
value={this.props.value}
name={this.props.fieldName}
doc={this.props.fieldSpec.doc}
/>
)
case 'color': return (
<ColorField
value={this.props.value}