import React from 'react'; import { Brand, Breadcrumb, BreadcrumbItem, Button, Content, Drawer, DrawerActions, DrawerCloseButton, DrawerContent, DrawerPanelContent, DrawerColorVariant, DrawerHead, Flex, Nav, NavItem, NavList, Page, PageSection, PageSectionTypes, PageSidebar, PageSidebarBody, SkipToContent, Masthead, MastheadMain, MastheadToggle, MastheadBrand, MastheadLogo, PageToggleButton, Wizard, WizardStep } from '@patternfly/react-core'; import pfLogo from '@patternfly/react-core/src/demos/assets/PF-HorizontalLogo-Color.svg'; import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon'; export const WizardFullPageWithDrawerDemo: React.FunctionComponent = () => { const [isDrawerExpanded, setIsDrawerExpanded] = React.useState(false); const [activeItem, setActiveItem] = React.useState(0); const drawerRef = React.useRef(null); const onExpand = () => { if (drawerRef.current) { drawerRef.current.focus(); } }; const onOpenClick = () => { setIsDrawerExpanded(true); }; const onCloseClick = () => { setIsDrawerExpanded(false); }; const onNavSelect = (_event: React.FormEvent, result: { itemId: number | string }) => { setActiveItem(result.itemId as number); }; const PageNav = ( ); const masthead = ( ); const Sidebar = ( {PageNav} ); const pageId = 'main-content-page-layout-default-nav'; const handleClick = (event) => { event.preventDefault(); const mainContentElement = document.getElementById(pageId); if (mainContentElement) { mainContentElement.focus(); } }; const PageSkipToContent = ( Skip to content ); const PageBreadcrumb = ( Section home Section title Section title Section landing ); const createStepContentWithDrawer = (stepName: string) => ( Drawer content: {stepName} } > {!isDrawerExpanded && ( )}
{stepName} content
); return (

Main title

A demo of a wizard in a page.

{createStepContentWithDrawer('Information step')} {createStepContentWithDrawer('Configuration substep A')} , {createStepContentWithDrawer('Configuration substep B')} ]} /> {createStepContentWithDrawer('Additional step')} {createStepContentWithDrawer('Review step')}
); };