@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.
42 lines (41 loc) • 1.42 kB
TypeScript
import { PopperProps } from '@mui/material/Popper';
import { ICommentAuthor } from '../CommentCard';
export type ICommentCreate = PopperProps & {
/**
* Information about the current user who is authoring the comment.
*
*```
* export type ICommentAuthor = {
* id: string;
* firstName: string;
* lastName: string;
* avatar: string;
* email: string;
* status?: string;
* backgroundColor?: string;
* textColor?: string;
* };
* ```
*/
author: ICommentAuthor;
/**
* Callback function executed when the Add button is clicked.
*/
onAdd: (comment: string) => void;
/**
* Callback function called when the cancel button is clicked. Also trigged when clicking off of the Popper.
*/
onCancel: () => void;
/**
* Mapping of statuses to colors used for the status badges for authors. You can define your own custom status strings that you want to use or use the presets. Colors support SX shorthand.
*
* @default { available: 'success.light', away: 'grey.300', offline: 'error.main' }
*/
statusMapping?: {
[key: string]: string;
};
};
/**
* @deprecated This component is deprecated and will be removed in a future release. Please use `CommentField` component instead.
*/
export declare const CommentCreateContainer: React.FC<ICommentCreate>;