Skip to main content

SnippetNotifications

Interfaces

SnippetNotificationsProps

Extends

  • CardProps

Indexable

[p: string]: any

Properties

PropertyTypeDescriptionOverrides
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?stringOverrides or extends the styles applied to the component.

Default
null
CardProps.className
handleCustomNotification?(data: any) => ElementHandle custom notification-
handleNotification?(type: any, data: any, content: any) => ElementHandle single notification
Override content
-
id?stringId of the UserNotification

Default
notification_<notificationObject.sid>
CardProps.id
key?numberThe obj keyCardProps.key
onFetchNotifications?(data: any) => voidCallback on fetch notifications

Default
null;
-
onNotificationClick?(event: any, notification: any) => voidCallback when click on single notification-
showMax?numberThe 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 NameGlobal classDescription
root.SCSnippetNotification-rootStyles applied to the root element.
notificationsWrap.SCSnippetNotification-notification-wrapStyles applied to the notifications wrap.
emptyBoxNotifications.SCSnippetNotification-empty-box-notificationsStyles applied to the box indicating that there are no notifications.
list.SCSnippetNotification-listStyles applied to the list of notifications.
item.SCSnippetNotification-itemStyles applied to the single notification.
broadcastMessagesBanner.SCSnippetNotification-broadcast-messages-bannerStyles applied to the broadcast message banner.

Parameters

ParameterTypeDescription
inPropsSnippetNotificationsProps

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 NameGlobal classDescription
root.SCSnippetNotification-skeleton-rootStyles applied to the root element.
item.SCSnippetNotification-itemStyles applied to the item element.

Parameters

ParameterType
propsany

Returns

JSX.Element

Source

packages/react-ui/src/components/SnippetNotifications/Skeleton.tsx:42