mirror of
https://github.com/maputnik/editor.git
synced 2026-07-18 11:57:27 +00:00
9c1499b805
## Launch Checklist See title, Also removed some "_" from some file names. This is a pure refactoring, no logic changes. - [x] Briefly describe the changes in this PR. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
27 lines
625 B
TypeScript
27 lines
625 B
TypeScript
|
|
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 const FieldId: React.FC<FieldIdProps> = (props) => {
|
|
return (
|
|
<Block label="ID" fieldSpec={latest.layer.id}
|
|
data-wd-key={props.wdKey}
|
|
error={props.error}
|
|
>
|
|
<InputString
|
|
value={props.value}
|
|
onInput={props.onChange}
|
|
data-wd-key={props.wdKey + ".input"}
|
|
/>
|
|
</Block>
|
|
);
|
|
};
|