UNPKG

@selfcommunity/react-templates

Version:

React Templates Components to integrate a Community created with SelfCommunity.

73 lines (66 loc) 2.02 kB
import { FeedObjectProps, FeedSidebarProps, SCFeedWidgetType } from '@selfcommunity/react-ui'; import { CategoryFeedProps } from '../CategoryFeed'; import { SCCategoryType } from '@selfcommunity/types'; export interface CategoryProps { /** * Id of the feed object * @default 'feed' */ id?: string; /** * Overrides or extends the styles applied to the component. * @default null */ className?: string; /** * Category Object * @default null */ category?: SCCategoryType; /** * Id of the category for filter the feed * @default null */ categoryId?: number | 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 Categoryfeed component * @default {} */ CategoryFeedProps?: CategoryFeedProps; } /** * > API documentation for the Community-JS Category Template. Learn about the available props and the CSS API. * * * This component renders a specific category's template. * Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-templates/Components/Category) #### Import ```jsx import {Category} from '@selfcommunity/react-templates'; ``` #### Component Name The name `SCCategoryTemplate` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCCategoryTemplate-root|Styles applied to the root element.| |feed|.SCCategoryTemplate-feed|Styles applied to the feed element.| * * @param inProps */ export default function Category(inProps: CategoryProps): JSX.Element;