import React from 'react'; import { Drawer, DrawerContent, DrawerPanelContent, DrawerColorVariant, DrawerHead, DrawerActions, DrawerCloseButton, Flex, Button, useWizardContext, Wizard, WizardStep } from '@patternfly/react-core'; import styles from '@patternfly/react-styles/css/components/Wizard/wizard'; const StepContentWithDrawer: React.FunctionComponent = () => { const [isDrawerExpanded, setIsDrawerExpanded] = React.useState(false); const { activeStep } = useWizardContext(); const drawerRef = React.useRef(null); const onWizardExpand = () => drawerRef.current && drawerRef.current.focus(); return ( Drawer content: {activeStep?.name} setIsDrawerExpanded(false)} /> } > {!isDrawerExpanded && ( )}
{activeStep?.name} content
); }; export const WizardStepDrawerContent: React.FunctionComponent = () => ( , ]} > Review step content );