migrate ui-components from flow to typescript

This commit is contained in:
Sebastian Sdorra
2019-10-20 16:59:02 +02:00
parent c41efbdc4f
commit f49e17a3a7
151 changed files with 2039 additions and 25265 deletions

View File

@@ -1,15 +1,10 @@
import React from 'react';
import LabelWithHelpIcon from './LabelWithHelpIcon';
export type SelectItem = {
value: string;
label: string;
};
import React, { ChangeEvent } from "react";
import LabelWithHelpIcon from "./LabelWithHelpIcon";
type Props = {
name?: string;
label?: string;
placeholder?: SelectItem[];
placeholder?: string;
value?: string;
autofocus?: boolean;
onChange: (value: string, name?: string) => void;
@@ -26,7 +21,7 @@ class Textarea extends React.Component<Props> {
}
}
handleInput = (event: SyntheticInputEvent<HTMLTextAreaElement>) => {
handleInput = (event: ChangeEvent<HTMLTextAreaElement>) => {
this.props.onChange(event.target.value, this.props.name);
};