UNPKG

@selfcommunity/react-templates

Version:

React Templates Components to integrate a Community created with SelfCommunity.

60 lines (53 loc) 1.77 kB
import { FeedObjectProps, FeedSidebarProps, FeedProps, SCFeedWidgetType } from '@selfcommunity/react-ui'; export interface MainFeedProps { /** * Id of the feed object * @default 'feed' */ id?: string; /** * Overrides or extends the styles applied to the component. * @default null */ className?: string; /** * Widgets to be rendered into the feed * @default [CategoriesFollowed, UserFollowed] */ 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 Main Feed Template. Learn about the available props and the CSS API. * * * This component renders the template for the main feed. * Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-templates/Components/MainFeed) #### Import ```jsx import {MainFeed} from '@selfcommunity/react-templates'; ``` #### Component Name The name `SCMainFeedTemplate` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCMainFeedTemplate-root|Styles applied to the root element.| * * @param inProps */ export default function MainFeed(inProps: MainFeedProps): JSX.Element;