mirror of
https://github.com/maputnik/editor.git
synced 2025-12-25 07:30:00 +00:00
Migration of jsx files to tsx 2 (#850)
This is to continue the work of migrating all the jsx files into tsx files. The MO is basically described here: #848. About 7 files to go...
This commit is contained in:
30
src/components/FieldComment.tsx
Normal file
30
src/components/FieldComment.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import React from 'react'
|
||||
|
||||
import Block from './Block'
|
||||
import InputString from './InputString'
|
||||
|
||||
type FieldCommentProps = {
|
||||
value?: string
|
||||
onChange(...args: unknown[]): unknown
|
||||
};
|
||||
|
||||
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"
|
||||
>
|
||||
<InputString
|
||||
multi={true}
|
||||
value={this.props.value}
|
||||
onChange={this.props.onChange}
|
||||
default="Comment..."
|
||||
/>
|
||||
</Block>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user