| 1 |
import { |
| 2 |
Page, |
| 3 |
Masthead, |
| 4 |
MastheadMain, |
| 5 |
MastheadToggle, |
| 6 |
MastheadBrand, |
| 7 |
MastheadLogo, |
| 8 |
MastheadContent, |
| 9 |
PageSidebar, |
| 10 |
PageSidebarBody, |
| 11 |
PageSection, |
| 12 |
PageToggleButton, |
| 13 |
Toolbar, |
| 14 |
ToolbarContent, |
| 15 |
ToolbarItem |
| 16 |
} from '@patternfly/react-core'; |
| 17 |
|
| 18 |
export const PageUncontrolledNav: React.FunctionComponent = () => { |
| 19 |
const headerToolbar = ( |
| 20 |
<Toolbar id="uncontrolled-toolbar"> |
| 21 |
<ToolbarContent> |
| 22 |
<ToolbarItem>header-tools</ToolbarItem> |
| 23 |
</ToolbarContent> |
| 24 |
</Toolbar> |
| 25 |
); |
| 26 |
|
| 27 |
const masthead = ( |
| 28 |
<Masthead> |
| 29 |
<MastheadMain> |
| 30 |
<MastheadToggle> |
| 31 |
<PageToggleButton isHamburgerButton aria-label="Global navigation" id="uncontrolled-nav-toggle" /> |
| 32 |
</MastheadToggle> |
| 33 |
<MastheadBrand> |
| 34 |
<MastheadLogo href="https://patternfly.org" target="_blank"> |
| 35 |
Logo |
| 36 |
</MastheadLogo> |
| 37 |
</MastheadBrand> |
| 38 |
</MastheadMain> |
| 39 |
<MastheadContent>{headerToolbar}</MastheadContent> |
| 40 |
</Masthead> |
| 41 |
); |
| 42 |
|
| 43 |
const sidebar = ( |
| 44 |
<PageSidebar id="uncontrolled-sidebar"> |
| 45 |
<PageSidebarBody>Navigation</PageSidebarBody> |
| 46 |
</PageSidebar> |
| 47 |
); |
| 48 |
|
| 49 |
return ( |
| 50 |
<Page isManagedSidebar masthead={masthead} sidebar={sidebar}> |
| 51 |
<PageSection aria-labelledby="section-1"> |
| 52 |
<h2 id="section-1">Uncontrolled nav example section 1</h2> |
| 53 |
</PageSection> |
| 54 |
<PageSection aria-labelledby="section-2"> |
| 55 |
<h2 id="section-2">Uncontrolled nav example section 2</h2> |
| 56 |
</PageSection> |
| 57 |
<PageSection aria-labelledby="section-3"> |
| 58 |
<h2 id="section-3">Uncontrolled nav example section 3</h2> |
| 59 |
</PageSection> |
| 60 |
</Page> |
| 61 |
); |
| 62 |
}; |