@selfcommunity/react-templates
Version:
React Templates Components to integrate a Community created with SelfCommunity.
71 lines (64 loc) • 2.05 kB
TypeScript
import { FeedObjectProps, FeedProps, FeedSidebarProps, SCFeedWidgetType } from '@selfcommunity/react-ui';
import { SCCategoryType } from '@selfcommunity/types';
export interface CategoryFeedProps {
/**
* 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;
/**
* 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 Category Feed Template. Learn about the available props and the CSS API.
*
*
* This component renders a specific category's feed.
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-templates/Components/CategoryFeed)
#### Import
```jsx
import {CategoryFeed} from '@selfcommunity/react-templates';
```
#### Component Name
The name `SCCategoryFeedTemplate` can be used when providing style overrides in the theme.
#### CSS
|Rule Name|Global class|Description|
|---|---|---|
|root|.SCCategoryFeedTemplate-root|Styles applied to the root element.|
*
* @param inProps
*/
export default function CategoryFeed(inProps: CategoryFeedProps): JSX.Element;