UNPKG

@selfcommunity/react-ui

Version:

React UI Components to integrate a Community created with SelfCommunity Platform.

86 lines (77 loc) 2.75 kB
import { CardProps } from '@mui/material'; export interface SnippetNotificationsProps extends CardProps { /** * Id of the UserNotification * @default `notification_<notificationObject.sid>` */ id?: string; /** * Overrides or extends the styles applied to the component. * @default null */ className?: string; /** * Handle custom notification * @param data */ handleCustomNotification?: (data: any) => JSX.Element; /** * Handle single notification * Override content */ handleNotification?: (type: any, data: any, content: any) => JSX.Element; /** * The max n of results shown * @default 20 */ showMax?: number; /** * The obj key */ key?: number; /** * Props to spread to ScrollContainer component * This lib use 'react-custom-scrollbars' component to perform scrollbars * For more info: https://github.com/malte-wessel/react-custom-scrollbars/blob/master/docs/API.md * @default {} */ ScrollContainerProps?: Record<string, any>; /** * Callback when click on single notification * @param notification */ onNotificationClick?: (event: any, notification: any) => void; /** * Callback on fetch notifications * @default null; */ onFetchNotifications?: (data: any) => void; /** * Any other properties */ [p: string]: any; } /** * > API documentation for the Community-JS SnippetNotifications component. Learn about the available props and the CSS API. * * * This component renders the notification list. * Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/SnippetNotifications) #### Import ```jsx import {SnippetNotifications} from '@selfcommunity/react-ui'; ``` #### Component Name The name `SCSnippetNotifications` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCSnippetNotification-root|Styles applied to the root element.| |notificationsWrap|.SCSnippetNotification-notification-wrap|Styles applied to the notifications wrap.| |emptyBoxNotifications|.SCSnippetNotification-empty-box-notifications|Styles applied to the box indicating that there are no notifications.| |list|.SCSnippetNotification-list|Styles applied to the list of notifications.| |item|.SCSnippetNotification-item|Styles applied to the single notification.| |broadcastMessagesBanner|.SCSnippetNotification-broadcast-messages-banner|Styles applied to the broadcast message banner.| * @param inProps */ export default function SnippetNotifications(inProps: SnippetNotificationsProps): JSX.Element;