mirror of
https://github.com/maputnik/editor.git
synced 2026-02-06 12:40:00 +00:00
33 lines
740 B
TypeScript
33 lines
740 B
TypeScript
import React from 'react'
|
|
|
|
import Block from './Block'
|
|
import InputString from './InputString'
|
|
|
|
type FieldCommentProps = {
|
|
value?: string
|
|
onChange(value: string | undefined): unknown
|
|
error: {message: string}
|
|
};
|
|
|
|
export default class FieldComment extends React.Component<FieldCommentProps> {
|
|
render() {
|
|
const fieldSpec = {
|
|
doc: "Comments for the current layer. This is non-standard and not in the spec."
|
|
};
|
|
|
|
return <Block
|
|
label={"Comments"}
|
|
fieldSpec={fieldSpec}
|
|
data-wd-key="layer-comment"
|
|
error={this.props.error}
|
|
>
|
|
<InputString
|
|
multi={true}
|
|
value={this.props.value}
|
|
onChange={this.props.onChange}
|
|
default="Comment..."
|
|
/>
|
|
</Block>
|
|
}
|
|
}
|