import React from 'react'; import { Button, Drawer, DrawerContent, DrawerPanelContent, DrawerHead, DrawerActions, DrawerCloseButton, Flex, Modal, ModalVariant, Wizard, WizardHeader, WizardStep, DrawerColorVariant } from '@patternfly/react-core'; export const WizardModalWithDrawerDemo: React.FunctionComponent = () => { const [isDrawerExpanded, setIsDrawerExpanded] = React.useState(false); const drawerRef = React.useRef(null); const onExpand = () => { if (drawerRef.current) { drawerRef.current.focus(); } }; const onOpenClick = () => { setIsDrawerExpanded(true); }; const onCloseClick = () => { setIsDrawerExpanded(false); }; const createStepContentWithDrawer = (stepName: string) => ( Drawer content: {stepName} } > {!isDrawerExpanded && ( )}
{stepName} content
); return ( } height={400} > {createStepContentWithDrawer('Information step')} {createStepContentWithDrawer('Configuration substep A')} , {createStepContentWithDrawer('Configuration substep B')} ]} /> {createStepContentWithDrawer('Additional step')} {createStepContentWithDrawer('Review step')} ); };