UNPKG

@xapp/chat-widget

Version:
24 lines (23 loc) 991 B
import 'rollup-plugin-inject-process-env'; import { RichTextValue, SuggestionsItemData } from "@xapp/chat-widget-core"; import { WidgetFooterConfig, WidgetInputConfig } from "@xapp/stentor-chat-widget"; import { DragEvent, FC } from "react"; import "./Input.scss"; export type SuggestionCommand = "prev" | "next" | "cancel"; export interface Props { readonly value: RichTextValue; readonly placeholder?: string; readonly sendButtonIcon?: string; readonly sendButtonIconHover?: string; readonly sendButtonIconDisabled?: string; readonly footerConfig?: WidgetFooterConfig; readonly inputConfig?: WidgetInputConfig; onSubmit: (msg: RichTextValue) => void; onFileUpload: (event: DragEvent<HTMLInputElement>) => void; addClass: string; suggestion?: SuggestionsItemData; onChange: (val: RichTextValue) => void; onSuggestionCommand?(cmd: SuggestionCommand): void; } declare const Input: FC<React.PropsWithChildren<Props>>; export default Input;