@intuitionrobotics/thunderstorm
Version:
37 lines (36 loc) • 1.12 kB
TypeScript
import * as React from 'react';
import { KeyboardEvent } from 'react';
import { Stylable } from "../tools/Stylable";
export type TS_TextAreaProps<Key> = Stylable & {
onChange?: (value: string, id: Key) => void;
onAccept?: () => void;
type: 'text' | 'number' | 'password';
name?: string;
value?: string;
error?: string;
placeholder?: string;
enable?: boolean;
id?: Key;
};
type State = {
id: string;
name?: string;
initialValue?: string;
value?: string;
};
export declare class TS_TextArea<Key extends string> extends React.Component<TS_TextAreaProps<Key>, State> {
constructor(props: TS_TextAreaProps<Key>);
private static getInitialState;
static getDerivedStateFromProps(props: TS_TextAreaProps<any>, state: State): {
id: any;
name: string | undefined;
initialValue: string | undefined;
value: string;
} | {
value: string | undefined;
};
changeValue: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
handleKeyPress: (event: KeyboardEvent) => void;
render(): React.JSX.Element;
}
export {};