Skip to main content

Notification

Interfaces

NotificationProps

Extends

  • CardProps.VirtualScrollerItemProps

Indexable

[p: string]: any

Properties

PropertyTypeDescriptionOverridesInherited from
className?stringOverrides or extends the styles applied to the component.

Default
null
CardProps.classNameCardProps.className
collapsedOtherAggregated?booleanCollapse or not other aggregated

Default
true
--
handleCustomNotification?(data: any) => ElementHandle custom notification--
id?stringId of the UserNotification

Default
notification_<notificationObject.sid>
CardProps.idCardProps.id
keynumberThe obj keyCardProps.keyCardProps.key
notificationObjectSCNotificationAggregatedTypeNotification obj

Default
null
--
onHeightChange?() => voidMust be called whenever a list item's height changes
(for example, when a user clicks an "Expand"/"Collapse" button of
a list item): it re-measures the item's height and updates VirtualScroller
layout. Every change in an item's height must come as a result of
changing some kind of a state, be it the item's state in VirtualScroller
via .onItemStateChange(), or some other state managed by the application.
Call this method to re-measure the current element.
VirtualScrollerItemProps.onHeightChangeVirtualScrollerItemProps.onHeightChange
onStateChange?(state: any) => voidSave current state and when the component re-mount
restore previous state using props. It is used to keep a copy of
VirtualScroller state so that it could be quickly restored
in case the VirtualScroller component gets unmounted and then
re-mounted back again — for example, when the user navigates away
by clicking on a list item and then navigates "Back" to the list.
VirtualScrollerItemProps.onStateChangeVirtualScrollerItemProps.onStateChange
showMaxAggregated?numberThe max n of results uncollapsed shown

Default
2
--

Functions

NotificationSkeleton()

NotificationSkeleton(props): JSX.Element

API documentation for the Community-JS Notification Skeleton component. Learn about the available props and the CSS API.

Import

import {NotificationSkeleton} from '@selfcommunity/react-ui';

Component Name

The name SCNotification-skeleton-root can be used when providing style overrides in the theme.

CSS

Rule NameGlobal classDescription
root.SCNotification-skeleton-rootStyles applied to the root element.

Parameters

ParameterType
propsany

Returns

JSX.Element

Source

packages/react-ui/src/components/Notification/Skeleton.tsx:39


UserNotification()

UserNotification(inProps): JSX.Element

API documentation for the Community-JS UserNotification component. Learn about the available props and the CSS API.

Import

import {UserNotification} from '@selfcommunity/react-ui';

Component Name

The name SCNotification can be used when providing style overrides in the theme.

CSS

Rule NameGlobal classDescription
root.SCNotification-rootStyles applied to the root element.
content.SCNotification-notification-wrapStyles applied to the element wrap.
header.SCNotification-notification-wrapStyles applied to the notification header.
title.SCNotification-titleStyles applied to the title element in the notification header.
image.SCNotification-imageStyles applied to the image element in the notification header.
username.SCNotification-usernameStyles applied to the user element in the notification header.
content.SCNotification-notification-contentStyles applied to the notification content.
unCollapsed.SCNotification-notification-wrapStyles applied to the uncollapsed elements.
collapsed.SCNotification-notification-wrapStyles applied to the collapsed elements.
stopButton.SCNotification-stop-notification-buttonStyles applied to the stop notification button.
showOtherAggregated.SCNotification-show-other-aggregatedStyles applied to the show other aggregated element.

Parameters

ParameterTypeDescription
inPropsNotificationProps

Returns

JSX.Element

Source

packages/react-ui/src/components/Notification/Notification.tsx:154