UNPKG

@selfcommunity/react-ui

Version:

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

72 lines (67 loc) 2.33 kB
import { VirtualScrollerItemProps } from '../../types/virtualScroller'; import { CacheStrategies } from '@selfcommunity/utils'; import { MessageProps } from './Message'; export interface BroadcastMessagesProps extends VirtualScrollerItemProps { /** * Id of the BroadcastMessages * @default 'broadcast_messages' */ id?: string; /** * Overrides or extends the styles applied to the component. * @default null */ className?: string; /** * Props to forward to Message component * @default empty */ MessageProps?: MessageProps; /** * Subscription channel for updates notification * When receive this event the component reacts updating data * @default `interaction.notification_banner` */ subscriptionChannel?: string; /** * Caching strategies * @default CacheStrategies.CACHE_FIRST */ cacheStrategy?: CacheStrategies; /** * Disable skeleton loader * @default false */ disableLoader?: boolean; /** * View all messages initially loaded * @default false */ viewAllMessages?: boolean; /** * Any other properties */ [p: string]: any; } /** * > API documentation for the Community-JS Broadcast Messages component. Learn about the available props and the CSS API. * * * This component handles message broadcasts. It initially displays unseen messages. If all messages have been viewed it will show at most one message. * Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/BroadcastMessages) #### Import ```jsx import {BroadcastMessages} from '@selfcommunity/react-ui'; ``` #### Component Name The name `SCBroadcastMessages` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCBroadcastMessages-root|Styles applied to the root element.| |boxLoadMore|.SCBroadcastMessages-box-load-more|Styles applied to load more box.| |avatarLoadMore|.SCBroadcastMessages-avatar-load-more|Styles applied to load more avatar.| |buttonLoadMore|.SCBroadcastMessages-button-load-more|Styles applied to load more button.| * @param inProps */ export default function BroadcastMessages(inProps: BroadcastMessagesProps): JSX.Element;