Debian Codegraph @

node/@patternfly/react-core/src/components/Page/PageSidebarBody.tsx

raw
1 import styles from '@patternfly/react-styles/css/components/Page/page';
2 import { css } from '@patternfly/react-styles';
3
4 export interface PageSidebarBodyProps extends React.HTMLProps<HTMLDivElement> {
5 /** Content rendered inside the page sidebar body */
6 children?: React.ReactNode;
7 /** Additional classes added to the page sidebar body */
8 className?: string;
9 /** Flag indicating that the page sidebar body should use page insets. */
10 usePageInsets?: boolean;
11 /** Flag indicating that the page sidebar body should fill the available vertical space. */
12 isFilled?: boolean;
13 /** Flag indicating that the page sidebar body is for a context selector/perspective switcher */
14 isContextSelector?: boolean;
15 }
16
17 export const PageSidebarBody: React.FunctionComponent<PageSidebarBodyProps> = ({
18 children,
19 className,
20 usePageInsets,
21 isFilled,
22 isContextSelector,
23 ...props
24 }: PageSidebarBodyProps) => (
25 <div
26 className={css(
27 styles.pageSidebarBody,
28 usePageInsets && styles.modifiers.pageInsets,
29 isFilled === false && styles.modifiers.noFill,
30 isFilled === true && styles.modifiers.fill,
31 isContextSelector === true && styles.modifiers.contextSelector,
32 className
33 )}
34 {...props}
35 >
36 {children}
37 </div>
38 );
39 PageSidebarBody.displayName = 'PageSidebarBody';