Categories
Interfaces
CategoriesProps
Indexable
[p: string]: any
Other props
Properties
| Property | Type | Description |
|---|---|---|
CategoriesSkeletonComponent? | (inProps) => Element | CategorySkeletonComponent component Usefully to override the single Category skeleton render component Default Skeleton |
CategoriesSkeletonProps? | CategoriesSkeletonProps | Props to spread to single category skeleton object Default {variant: 'outlined'} |
CategoryComponent? | (inProps) => Element | CategoryComponent component Usefully to override the single Category render component Default Category |
CategoryComponentProps? | CategoryProps | Props to spread to single category object Default {variant: 'outlined', ButtonBaseProps: {disableRipple: 'true'}} |
className? | string | Overrides or extends the styles applied to the component. Default null |
filters? | Element | Filters component Param |
handleFilterCategories? | (categories) => SCCategoryType[] | Override filter func Default null |
prefetchedCategories? | SCCategoryType[] | Prefetch categories. Useful for SSR. Use this to init the component with categories Default null |
showFilters? | boolean | Show/Hide filters Default true |
CategoriesSkeletonProps
Properties
Functions
Categories()
Categories(
inProps):Element
API documentation for the Community-JS Categories component. Learn about the available props and the CSS API.
The Categories component renders the list of all available categories. Take a look at our demo component here
Import
import {Categories} from '@selfcommunity/react-ui';
Component Name
The name SCCategories can be used when providing style overrides in the theme.
CSS
| Rule Name | Global class | Description |
|---|---|---|
| root | .SCCategories-root | Styles applied to the root element. |
| filters | .SCCategories-filter | Styles applied to the filter. |
| categories | .SCCategories-categories | Styles applied to the list of categories. |
| category | .SCCategories-category | Styles applied to the of category element. |
| noResults | .SCCategories-no-results | Styles applied to no results section. |
Parameters
| Parameter | Type | Description |
|---|---|---|
inProps | CategoriesProps |
Returns
Element
CategoriesSkeleton()
CategoriesSkeleton(
inProps):Element
API documentation for the Community-JS Categories Skeleton component. Learn about the available props and the CSS API.
Import
import {CategoriesSkeleton} from '@selfcommunity/react-ui';
Component Name
The name SCCategories-skeleton-root can be used when providing style overrides in the theme.
CSS
| Rule Name | Global class | Description |
|---|---|---|
| root | .SCCategories-skeleton-root | Styles applied to the root element. |
| categories | .SCCategories-categories | Styles applied to the categories' element. |
Parameters
| Parameter | Type |
|---|---|
inProps | CategoriesSkeletonProps |
Returns
Element