| 1 |
import { |
| 2 |
Page, |
| 3 |
Masthead, |
| 4 |
MastheadMain, |
| 5 |
MastheadBrand, |
| 6 |
MastheadLogo, |
| 7 |
MastheadContent, |
| 8 |
PageSection, |
| 9 |
Toolbar, |
| 10 |
ToolbarContent, |
| 11 |
ToolbarItem |
| 12 |
} from '@patternfly/react-core'; |
| 13 |
|
| 14 |
export const PageHorizontalNav: React.FunctionComponent = () => { |
| 15 |
const headerToolbar = ( |
| 16 |
<Toolbar id="horizontal-toolbar"> |
| 17 |
<ToolbarContent> |
| 18 |
<ToolbarItem>Navigation</ToolbarItem> |
| 19 |
<ToolbarItem>header-tools</ToolbarItem> |
| 20 |
</ToolbarContent> |
| 21 |
</Toolbar> |
| 22 |
); |
| 23 |
|
| 24 |
const masthead = ( |
| 25 |
<Masthead inset={{ default: 'insetXs' }}> |
| 26 |
<MastheadMain> |
| 27 |
<MastheadBrand> |
| 28 |
<MastheadLogo href="https://patternfly.org" target="_blank"> |
| 29 |
Logo |
| 30 |
</MastheadLogo> |
| 31 |
</MastheadBrand> |
| 32 |
</MastheadMain> |
| 33 |
<MastheadContent>{headerToolbar}</MastheadContent> |
| 34 |
</Masthead> |
| 35 |
); |
| 36 |
|
| 37 |
return ( |
| 38 |
<Page masthead={masthead}> |
| 39 |
<PageSection aria-labelledby="section-1"> |
| 40 |
<h2 id="section-1">Horizontal nav example section 1</h2> |
| 41 |
</PageSection> |
| 42 |
<PageSection variant="secondary" aria-labelledby="section-2"> |
| 43 |
<h2 id="section-2">Horizontal nav example section 2 with secondary variant styling</h2> |
| 44 |
</PageSection> |
| 45 |
<PageSection aria-labelledby="section-3"> |
| 46 |
<h2 id="section-3">Horizontal nav example section 3</h2> |
| 47 |
</PageSection> |
| 48 |
</Page> |
| 49 |
); |
| 50 |
}; |