UNPKG

@eccenca/gui-elements

Version:

GUI elements based on other libraries, usable in React application, written in Typescript.

21 lines (20 loc) 841 B
import React from "react"; import { TestableComponent } from "../../components/interfaces"; import { TextAreaProps } from "../TextField/TextArea"; export interface ChatFieldProps extends TextAreaProps, TestableComponent { /** * Default input to start with. */ children?: string; /** * Callback handler to process the input of the field when `Enter` is pressed or the submit button is clicked. * If you use it together with your own handlers for `onChange` and `onKeyDown` it won't work properly. */ onTextSubmit?: (value: string) => void; } /** * Component to input chat text. * Based on `TextArea` component. */ export declare const ChatField: ({ className, onTextSubmit, onChange, onKeyDown, rightElement, ...otherTextAreaProps }: ChatFieldProps) => React.JSX.Element; export default ChatField;