@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
45 lines (44 loc) • 1.14 kB
TypeScript
import { CardProps } from '@mui/material';
import { SCBroadcastMessageTemplateType } from '../../types';
import { SCBroadcastMessageType } from '@selfcommunity/types';
export interface MessageProps extends CardProps {
/**
* Id of the Message
* @default 'message_<id>'
*/
id?: string;
/**
* Overrides or extends the styles applied to the component.
* @default null
*/
className?: string;
/**
* Banner of the message
*/
message: SCBroadcastMessageType;
/**
* Bypass mark read message
* @default false
*/
disableMarkRead?: boolean;
/**
* Handler triggered when message is closed
* @default null
*/
onClose?: (message: SCBroadcastMessageType) => void;
/**
* Handler triggered when message is readed
* @default null
*/
onRead?: (message: SCBroadcastMessageType) => void;
/**
* Template type
* @default 'preview'
*/
template?: SCBroadcastMessageTemplateType;
/**
* Any other properties
*/
[p: string]: any;
}
export default function Message(props: MessageProps): JSX.Element;