@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
78 lines (69 loc) • 2.61 kB
TypeScript
import { CardProps } from '@mui/material';
import { VirtualScrollerItemProps } from '../../types/virtualScroller';
import { SCNotificationAggregatedType } from '@selfcommunity/types';
export interface NotificationProps extends CardProps, VirtualScrollerItemProps {
/**
* Id of the UserNotification
* @default `notification_<notificationObject.sid>`
*/
id?: string;
/**
* Overrides or extends the styles applied to the component.
* @default null
*/
className?: string;
/**
* Notification obj
* @default null
*/
notificationObject: SCNotificationAggregatedType;
/**
* Handle custom notification
* @param data
*/
handleCustomNotification?: (data: any) => JSX.Element;
/**
* Collapse or not other aggregated
* @default true
*/
collapsedOtherAggregated?: boolean;
/**
* The max n of results uncollapsed shown
* @default 2
*/
showMaxAggregated?: number;
/**
* The obj key
*/
key: number;
/**
* Any other properties
*/
[p: string]: any;
}
/**
*
> API documentation for the Community-JS UserNotification component. Learn about the available props and the CSS API.
#### Import
```jsx
import {UserNotification} from '@selfcommunity/react-ui';
```
#### Component Name
The name `SCNotification` can be used when providing style overrides in the theme.
#### CSS
|Rule Name|Global class|Description|
|---|---|---|
|root|.SCNotification-root|Styles applied to the root element.|
|content|.SCNotification-notification-wrap|Styles applied to the element wrap.|
|header|.SCNotification-notification-wrap|Styles applied to the notification header.|
|title|.SCNotification-title|Styles applied to the title element in the notification header.|
|image|.SCNotification-image|Styles applied to the image element in the notification header.|
|username|.SCNotification-username|Styles applied to the user element in the notification header.|
|content|.SCNotification-notification-content|Styles applied to the notification content.|
|unCollapsed|.SCNotification-notification-wrap|Styles applied to the uncollapsed elements.|
|collapsed|.SCNotification-notification-wrap|Styles applied to the collapsed elements.|
|stopButton|.SCNotification-stop-notification-button|Styles applied to the stop notification button.|
|showOtherAggregated|.SCNotification-show-other-aggregated|Styles applied to the show other aggregated element.|
* @param inProps
*/
export default function UserNotification(inProps: NotificationProps): JSX.Element;