SnippetNotifications
Interfaces
SnippetNotificationsProps
Extends
CardProps
Indexable
[p
: string
]: any
Properties
Property | Type | Description | Overrides |
---|---|---|---|
ScrollContainerProps? | Record <string , any > | 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 {} | - |
className? | string | Overrides or extends the styles applied to the component. Default null | CardProps.className |
handleCustomNotification? | (data : any ) => Element | Handle custom notification | - |
handleNotification? | (type : any , data : any , content : any ) => Element | Handle single notification Override content | - |
id? | string | Id of the UserNotification Default notification_<notificationObject.sid> | CardProps.id |
key? | number | The obj key | CardProps.key |
onFetchNotifications? | (data : any ) => void | Callback on fetch notifications Default null; | - |
onNotificationClick? | (event : any , notification : any ) => void | Callback when click on single notification | - |
showMax? | number | The max n of results shown Default 20 | - |
Functions
SnippetNotifications()
SnippetNotifications(
inProps
):JSX.Element
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 demo component here
Import
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. |
Parameters
Parameter | Type | Description |
---|---|---|
inProps | SnippetNotificationsProps |
Returns
JSX.Element
Source
packages/react-ui/src/components/SnippetNotifications/SnippetNotifications.tsx:156
SnippetNotificationsSkeleton()
SnippetNotificationsSkeleton(
props
):JSX.Element
API documentation for the Community-JS Snippet Notification Skeleton component. Learn about the available props and the CSS API.
Import
import {SnippetNotificationsSkeleton} from '@selfcommunity/react-ui';
Component Name
The name SCSnippetNotification-skeleton-root
can be used when providing style overrides in the theme.
CSS
Rule Name | Global class | Description |
---|---|---|
root | .SCSnippetNotification-skeleton-root | Styles applied to the root element. |
item | .SCSnippetNotification-item | Styles applied to the item element. |
Parameters
Parameter | Type |
---|---|
props | any |
Returns
JSX.Element
Source
packages/react-ui/src/components/SnippetNotifications/Skeleton.tsx:42