UNPKG

@selfcommunity/react-templates

Version:

React Templates Components to integrate a Community created with SelfCommunity.

71 lines (64 loc) 2.03 kB
import { SCUserType } from '@selfcommunity/types'; import { FeedObjectProps, FeedProps, FeedSidebarProps, SCFeedWidgetType } from '@selfcommunity/react-ui'; export interface UserFeedProps { /** * Id of the feed object * @default 'user_feed' */ id?: string; /** * Overrides or extends the styles applied to the component. * @default null */ className?: string; /** * Id of the user for filter the feed * @default null */ userId?: number; /** * User Object * @default null */ user?: SCUserType; /** * Widgets to be rendered into the feed * @default [UserFollowedCategoriesWidget, UserFollowedUsersWidget] */ widgets?: SCFeedWidgetType[] | null; /** * Props to spread to single feed object * @default empty object */ FeedObjectProps?: FeedObjectProps; /** * Props to spread to single feed object * @default {top: 0, bottomBoundary: `#${id}`} */ FeedSidebarProps?: FeedSidebarProps; /** * Props to spread to feed component * @default {} */ FeedProps?: Omit<FeedProps, 'endpoint' | 'widgets' | 'ItemComponent' | 'itemPropsGenerator' | 'itemIdGenerator' | 'ItemSkeleton' | 'ItemSkeletonProps' | 'FeedSidebarProps'>; } /** * > API documentation for the Community-JS User Feed Template. Learn about the available props and the CSS API. * * * This component renders a specific user's feed template. * Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-templates/Components/UserFeed) #### Import ```jsx import {UserFeed} from '@selfcommunity/react-templates'; ``` #### Component Name The name `SCUserFeedTemplate` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCUserFeedTemplate-root|Styles applied to the root element.| * * @param inProps */ export default function UserFeed(inProps: UserFeedProps): JSX.Element;