@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
66 lines (62 loc) • 2.34 kB
TypeScript
import { CategoryFollowButtonProps } from '../CategoryFollowButton';
import { SCCategoryType } from '@selfcommunity/types';
import { CategoryFollowersButtonProps } from '../CategoryFollowersButton';
export interface CategoryHeaderProps {
/**
* Overrides or extends the styles applied to the component.
* @default null
*/
className?: string;
/**
* Category Object
* @default null
*/
category?: SCCategoryType;
/**
* Id of category object
* @default null
*/
categoryId?: number;
/**
* Props to spread category button followed
* @default {}
*/
CategoryFollowButtonProps?: Pick<CategoryFollowButtonProps, Exclude<keyof CategoryFollowButtonProps, 'category' | 'onFollow'>>;
/**
* Props to spread to followedBy dialog
* @default {}
*/
CategoryFollowersButtonProps?: Pick<CategoryFollowersButtonProps, Exclude<keyof CategoryFollowersButtonProps, 'category' | 'categoryId'>>;
/**
* Any other properties
*/
[p: string]: any;
}
/**
* > API documentation for the Community-JS Category AppBar component. Learn about the available props and the CSS API.
*
*
* This component renders the top section for category pages.
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/CategoryHeader)
*
#### Import
```jsx
import {CategoryHeader} from '@selfcommunity/react-ui';
```
#### Component Name
The name `SCCategoryHeader` can be used when providing style overrides in the theme.
* #### CSS
*
|Rule Name|Global class|Description|
|---|---|---|
|root|.SCCategoryHeader-root|Styles applied to the root element.|
|cover|.SCCategoryHeader-cover|Styles applied to the cover element.|
|name|.SCCategoryHeader-name|Styles applied to the name element.|
|slogan|.SCCategoryHeader-slogan|Styles applied to the slogan element.|
|info|.SCCategoryHeader-info|Styles applied to the info element.|
|followedCounter|.SCCategoryHeader-followed-by-counter|Styles applied to the followers counter element.|
|followed|.SCCategoryHeader-followed|Styles applied to the followers avatars section.|
|action|.SCCategoryHeader-action|Styles applied to the action section.|
* @param inProps
*/
export default function CategoryHeader(inProps: CategoryHeaderProps): JSX.Element;