UNPKG

@vectara/vectara-ui

Version:

Vectara's design system, codified as a React and Sass component library

42 lines (41 loc) 1.6 kB
export type ComposerSubmission = { text: string; files: File[]; }; export type ComposerFileError = { file: File; message: string; }; export type ComposerShortcutApi = { value: string; setValue: (value: string) => void; clear: () => void; }; export type ComposerShortcutHandler = (event: React.KeyboardEvent<HTMLTextAreaElement>, composer: ComposerShortcutApi) => void; type Props = { onSubmit: (submission: ComposerSubmission) => void; isRunning?: boolean; onCancel?: () => void; isSendDisabled?: boolean; sendLabel?: string; cancelLabel?: string; placeholder?: string; autoFocus?: boolean; onChange?: (value: string) => void; value?: string; enableHistory?: boolean; historyKey?: string; canUploadFiles?: boolean; accept?: string; validateFile?: (file: File) => string | null; onFilesRejected?: (errors: ComposerFileError[]) => void; fileDropScope?: "document" | "composer"; fileDropMessage?: React.ReactNode; onShortcutKeys?: Record<string, ComposerShortcutHandler>; leadingActions?: React.ReactNode; footer?: React.ReactNode; className?: string; "data-testid"?: string; }; export declare const VuiComposer: ({ onSubmit, isRunning, onCancel, isSendDisabled, sendLabel, cancelLabel, placeholder, autoFocus, onChange, value, enableHistory, historyKey, canUploadFiles, accept, validateFile, onFilesRejected, fileDropScope, fileDropMessage, onShortcutKeys, leadingActions, footer, className, "data-testid": dataTestId }: Props) => import("react/jsx-runtime").JSX.Element; export {};