@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
69 lines (65 loc) • 2.42 kB
TypeScript
import { CacheStrategies } from '@selfcommunity/utils';
import { CategoryProps } from '../Category';
import { BaseDialogProps } from '../../shared/BaseDialog';
import { WidgetProps } from '../Widget';
import { VirtualScrollerItemProps } from '../../types/virtualScroller';
export interface UserFollowedCategoriesWidgetProps extends VirtualScrollerItemProps, WidgetProps {
/**
* The user id
* @default null
*/
userId: number;
/**
* Hides this component
* @default false
*/
autoHide?: boolean;
/**
* Limit the number of categories to show
* @default false
*/
limit?: number;
/**
* Props to spread to single category object
* @default empty object
*/
CategoryProps?: CategoryProps;
/**
* Caching strategies
* @default CacheStrategies.CACHE_FIRST
*/
cacheStrategy?: CacheStrategies;
/**
* Props to spread to followed categories dialog
* @default {}
*/
DialogProps?: BaseDialogProps;
/**
* Other props
*/
[p: string]: any;
}
/**
* > API documentation for the Community-JS User Profile Categories Followed Widget component. Learn about the available props and the CSS API.
*
*
* This component renders the list of the categories that the given user follows.
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/UserFollowedCategories)
#### Import
```jsx
import {UserFollowedCategoriesWidget} from '@selfcommunity/react-ui';
```
#### Component Name
The name `SCUserCategoriesFollowedWidget` can be used when providing style overrides in the theme.
#### CSS
|Rule Name|Global class|Description|
|---|---|---|
|root|.SCUserCategoriesFollowedWidget-root|Styles applied to the root element.|
|title|.SCUserCategoriesFollowedWidget-title|Styles applied to the title element.|
|noResults|.SCUserCategoriesFollowedWidget-no-results|Styles applied to no results section.|
|showMore|.SCUserCategoriesFollowedWidget-show-more|Styles applied to show more button element.|
|dialogRoot|.SCUserCategoriesFollowedWidget-dialog-root|Styles applied to the root dialog element.|
|endMessage|.SCUserCategoriesFollowedWidget-end-message|Styles applied to the end message element.|
* @param inProps
*/
export default function UserFollowedCategoriesWidget(inProps: UserFollowedCategoriesWidgetProps): JSX.Element;