@nexusui/components
Version:
These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.
51 lines (50 loc) • 1.52 kB
TypeScript
import { ICommentAttachment } from '../../CommentCard';
export type ICommentTextField = {
/**
* Initial comment during editing.
*/
initialComment?: string;
/**
* Initial attachments during editing.
*/
initialAttachments?: ReadonlyArray<ICommentAttachment>;
/**
* Initial tags during editing.
*/
initialTags?: ReadonlyArray<string>;
/**
* Initial custom data during editing.
*/
initialMetadata?: Record<string, any>;
/**
* Placeholder for the input text.
*/
placeholder?: string;
/**
* Callback function when the active user submits a new reply to the thread.
*/
onSave?: (message: string, attachments?: ICommentAttachment[], tags?: string[], metadata?: Record<string, any>) => void;
/**
* Callback function when comment changes.
*/
onCommentChange?: (message: string, attachments?: ICommentAttachment[], tags?: string[], metadata?: Record<string, any>) => void;
/**
* Callback function when comment canceled.
*/
onCancel?: () => void;
/**
* Auto focused on text field.
* @default false
*/
autoFocus?: boolean;
/**
* Indicate the active/disabled state of the comment filed.
* @default false
*/
disabled?: boolean;
/**
* Indicate if comment is under `add` or `edit` state
*/
state?: 'add' | 'edit';
};
export declare const CommentTextField: (props: ICommentTextField) => import("react/jsx-runtime").JSX.Element;