Debian Codegraph @

node/@patternfly/react-core/src/components/Drawer/DrawerContentBody.tsx

raw
1 import styles from '@patternfly/react-styles/css/components/Drawer/drawer';
2 import { css } from '@patternfly/react-styles';
3
4 export interface DrawerContentBodyProps extends React.HTMLProps<HTMLDivElement> {
5 /** Additional classes added to the Drawer. */
6 className?: string;
7 /** Content to be rendered in the drawer */
8 children?: React.ReactNode;
9 /** Indicates if there should be padding around the drawer content body */
10 hasPadding?: boolean;
11 }
12
13 export const DrawerContentBody: React.FunctionComponent<DrawerContentBodyProps> = ({
14 className = '',
15 children,
16 hasPadding = false,
17 ...props
18 }: DrawerContentBodyProps) => (
19 <div className={css(styles.drawerBody, hasPadding && styles.modifiers.padding, className)} {...props}>
20 {children}
21 </div>
22 );
23 DrawerContentBody.displayName = 'DrawerContentBody';