mirror of
https://github.com/maputnik/editor.git
synced 2026-08-04 12:17:25 +00:00
b784bf2b84
Recover commented out tests, Improve usage of helper in driver, Added data-wd-key for test to use instead of classes Moved all non tsx file to a single folder (lib) instead of lib and utils --------- Co-authored-by: Yuri Astrakhan <yuriastrakhan@gmail.com>
34 lines
782 B
TypeScript
34 lines
782 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..."
|
|
data-wd-key="layer-comment.input"
|
|
/>
|
|
</Block>
|
|
}
|
|
}
|