import { Drawer, DrawerContent, DrawerProps } from '../Drawer'; import styles from '@patternfly/react-styles/css/components/Compass/compass'; import { css } from '@patternfly/react-styles'; export interface CompassContentProps extends React.HTMLProps { /** Content of the main Compass area. Typically one or more `Panel` components. */ children: React.ReactNode; /** Additional classes added to the CompassContent */ className?: string; /** Content rendered in an optional drawer wrapping the CompassContent */ drawerContent?: React.ReactNode; /** Additional props passed to the drawer */ drawerProps?: DrawerProps; } export const CompassContent: React.FunctionComponent = ({ children, className, drawerProps, drawerContent, ...props }: CompassContentProps) => { const hasDrawer = drawerContent !== undefined; const compassContent = (
{children}
); if (hasDrawer) { return ( {compassContent} ); } return compassContent; }; CompassContent.displayName = 'CompassContent';