mirror of
https://github.com/maputnik/editor.git
synced 2026-01-03 20:10:02 +00:00
This PR aims at updating MapLibre dependencies. The main goal of this update is to allow adding terrain specification to the editor. This requires version 4 of maplibre so currently it will use the pre-release.
28 lines
683 B
TypeScript
28 lines
683 B
TypeScript
import React from 'react'
|
|
|
|
import latest from '@maplibre/maplibre-gl-style-spec/dist/latest.json'
|
|
import Block from './Block'
|
|
import InputString from './InputString'
|
|
|
|
type FieldIdProps = {
|
|
value: string
|
|
wdKey: string
|
|
onChange(value: string | undefined): unknown
|
|
error?: {message: string}
|
|
};
|
|
|
|
export default class FieldId extends React.Component<FieldIdProps> {
|
|
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}
|
|
data-wd-key={this.props.wdKey + ".input"}
|
|
/>
|
|
</Block>
|
|
}
|
|
}
|