mirror of
https://github.com/maputnik/editor.git
synced 2026-09-01 09:57:27 +00:00
28 lines
684 B
React
28 lines
684 B
React
import React from 'react'
|
|
import PropTypes from 'prop-types'
|
|
|
|
import {latest} from '@maplibre/maplibre-gl-style-spec'
|
|
import Block from './Block'
|
|
import InputString from './InputString'
|
|
|
|
export default class FieldId extends React.Component {
|
|
static propTypes = {
|
|
value: PropTypes.string.isRequired,
|
|
wdKey: PropTypes.string.isRequired,
|
|
onChange: PropTypes.func.isRequired,
|
|
error: PropTypes.object,
|
|
}
|
|
|
|
render() {
|
|
return <Block label={"ID"} fieldSpec={latest.layer.id}
|
|
data-wd-key={this.props.wdKey}
|
|
error={this.props.error}
|
|
>
|
|
<InputString
|
|
value={this.props.value}
|
|
onInput={this.props.onChange}
|
|
/>
|
|
</Block>
|
|
}
|
|
}
|