maputnik/src/components/layers/LayerIdBlock.jsx

24 lines
579 B
React
Raw Normal View History

import React from 'react'
2017-01-09 16:45:59 +01:00
import GlSpec from 'mapbox-gl-style-spec/reference/latest.js'
import InputBlock from '../inputs/InputBlock'
import StringInput from '../inputs/StringInput'
class LayerIdBlock extends React.Component {
static propTypes = {
value: React.PropTypes.string.isRequired,
onChange: React.PropTypes.func.isRequired,
}
render() {
2017-01-09 18:43:04 +01:00
return <InputBlock label={"ID"} doc={GlSpec.layer.id.doc}>
<StringInput
value={this.props.value}
onChange={this.props.onChange}
/>
</InputBlock>
}
}
export default LayerIdBlock