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
|
|
|
|
2018-05-17 11:44:54 +02:00
|
|
|
import * as styleSpec from '@mapbox/mapbox-gl-style-spec/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,
|
2018-01-05 18:45:55 +01:00
|
|
|
wdKey: PropTypes.string.isRequired,
|
2017-11-06 16:32:04 +01:00
|
|
|
onChange: PropTypes.func.isRequired,
|
2016-12-29 14:44:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
2018-01-05 18:45:55 +01:00
|
|
|
return <InputBlock label={"ID"} doc={styleSpec.latest.layer.id.doc}
|
|
|
|
data-wd-key={this.props.wdKey}
|
|
|
|
>
|
2016-12-29 14:44:46 +01:00
|
|
|
<StringInput
|
|
|
|
value={this.props.value}
|
|
|
|
onChange={this.props.onChange}
|
|
|
|
/>
|
|
|
|
</InputBlock>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default LayerIdBlock
|