UNPKG

@selfcommunity/react-ui

Version:

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

77 lines (67 loc) 1.97 kB
import { ButtonBaseProps } from '@mui/material'; import { SCGroupType } from '@selfcommunity/types'; import { WidgetProps } from '../Widget'; import { GroupSubscribeButtonProps } from '../GroupSubscribeButton'; export interface GroupProps extends WidgetProps { /** * Group Object * @default null */ group?: SCGroupType; /** * Id of the group for filter the feed * @default null */ groupId?: number; /** * Props to spread to group subscribe/unsubscribe button * @default {} */ groupSubscribeButtonProps?: GroupSubscribeButtonProps; /** * Badge content to show as group avatar badge if show reaction is true. */ badgeContent?: any; /** * Prop to hide actions * @default false */ hideActions?: boolean; /** * Prop to redirect the user to the group page * @default false */ actionRedirect?: boolean; /** * Props to spread to the button * @default {} */ buttonProps?: ButtonBaseProps; /** * Any other properties */ [p: string]: any; } /** * > API documentation for the Community-JS Group component. Learn about the available props and the CSS API. * * * This component renders a group item. * Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/Group) #### Import ```jsx import {group} from '@selfcommunity/react-ui'; ``` #### Component Name The name `SCGroup` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCGroup-root|Styles applied to the root element.| |avatar|.SCGroup-avatar|Styles applied to the avatar element.| |actions|.SCGroup-actions|Styles applied to the actions section.| |icon|.SCGroup-icon|Styles applied to the group privacy icon element.| * * @param inProps */ export default function Group(inProps: GroupProps): JSX.Element;