UNPKG

@selfcommunity/react-ui

Version:

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

90 lines (81 loc) 2.56 kB
import { SCGroupType } from '@selfcommunity/types'; import { ChangeGroupCoverProps } from '../ChangeGroupCover'; import { ChangeGroupPictureProps } from '../ChangeGroupPicture'; import { GroupMembersButtonProps } from '../GroupMembersButton'; import { GroupSubscribeButtonProps } from '../GroupSubscribeButton'; import { GroupActionsMenuProps } from '../GroupActionsMenu'; export interface GroupHeaderProps { /** * Id of group object * @default null */ id?: string; /** * Overrides or extends the styles applied to the component. * @default null */ className?: string; /** * Group Object * @default null */ group?: SCGroupType; /** * Id of the group * @default null */ groupId?: number; /** * Props to spread change picture button * @default {} */ ChangePictureProps?: ChangeGroupPictureProps; /** * Props to spread change cover button * @default {} */ ChangeCoverProps?: ChangeGroupCoverProps; /** * Props to spread group button followed * @default {} */ GroupSubscribeButtonProps?: GroupSubscribeButtonProps; /** * Props to spread to the group memebers button * @default {} */ GroupMembersButtonProps?: GroupMembersButtonProps; /** * Props to spread event actions menu * @default {} */ GroupActionsProps?: Omit<GroupActionsMenuProps, 'group'>; /** * Any other properties */ [p: string]: any; } /** * > API documentation for the Community-JS Group Header component. Learn about the available props and the CSS API. * * * This component renders the groups top section. #### Import ```jsx import {UserProfileHeader} from '@selfcommunity/react-ui'; ``` #### Component Name The name `SCGroupHeader` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCGroupHeader-root|Styles applied to the root element.| |cover|.SCGroupHeader-cover|Styles applied to the cover element.| |avatar|.SCGroupHeader-avatar|Styles applied to the avatar element.| |info|SCGroupHeader-info|Styles applied to the info section.| |name|SCGroupHeader-username|Styles applied to the username element.| |changePicture|.SCGroupHeader-change-picture|Styles applied to changePicture element.| |changeCover|.SCGroupHeader-change-cover`|Styles applied to changeCover element.| * @param inProps */ export default function GroupHeader(inProps: GroupHeaderProps): JSX.Element;