2016-12-29 14:44:46 +01:00
|
|
|
import React from 'react'
|
2017-11-06 16:32:04 +01:00
|
|
|
import PropTypes from 'prop-types'
|
2016-12-29 14:44:46 +01:00
|
|
|
|
2017-04-10 14:29:57 +02:00
|
|
|
import styleSpec from '@mapbox/mapbox-gl-style-spec'
|
2016-12-29 14:44:46 +01:00
|
|
|
import InputBlock from '../inputs/InputBlock'
|
|
|
|
import StringInput from '../inputs/StringInput'
|
|
|
|
|
|
|
|
class LayerIdBlock extends React.Component {
|
|
|
|
static propTypes = {
|
2017-11-06 16:32:04 +01:00
|
|
|
value: PropTypes.string.isRequired,
|
|
|
|
onChange: PropTypes.func.isRequired,
|
2016-12-29 14:44:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
2017-04-10 14:29:57 +02:00
|
|
|
return <InputBlock label={"ID"} doc={styleSpec.latest.layer.id.doc}>
|
2016-12-29 14:44:46 +01:00
|
|
|
<StringInput
|
|
|
|
value={this.props.value}
|
|
|
|
onChange={this.props.onChange}
|
|
|
|
/>
|
|
|
|
</InputBlock>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default LayerIdBlock
|