UNPKG

@xapp/chat-widget

Version:
22 lines (21 loc) 909 B
import 'rollup-plugin-inject-process-env'; import { RichTextValue, SuggestionsItemData } from "@xapp/chat-widget-core"; import { WidgetFooterConfig, WidgetInputConfig } from "@xapp/stentor-chat-widget"; import React, { 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 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;