mirror of
https://github.com/maputnik/editor.git
synced 2026-01-06 05:20:01 +00:00
In this PR I have changed some of the jsx files to tsx file. I'm starting off with the "leafs" so that migration of the rest will be easier, hopefully. What I'm basically doing is taking a jsx file, copy paste it into: https://mskelton.dev/ratchet And after that I'm fixing the types as needed. It's not a very long process. Hopefully more PRs will follow and this will be over soon. I don't plan to migrate the storybook as I generally don't understand why is it useful, I'll open an issue to see if anyone thinks differently.
23 lines
444 B
TypeScript
23 lines
444 B
TypeScript
import React from 'react'
|
|
import Block from './Block'
|
|
import InputSelect, {InputSelectProps} from './InputSelect'
|
|
|
|
|
|
type FieldSelectProps = InputSelectProps & {
|
|
label?: string
|
|
fieldSpec?: {
|
|
doc: string
|
|
}
|
|
};
|
|
|
|
|
|
export default class FieldSelect extends React.Component<FieldSelectProps> {
|
|
render() {
|
|
return <Block label={this.props.label} fieldSpec={this.props.fieldSpec}>
|
|
<InputSelect {...this.props}/>
|
|
</Block>
|
|
}
|
|
}
|
|
|
|
|