|
| 1 | +--- |
| 2 | +id: Page |
| 3 | +section: components |
| 4 | +--- |
| 5 | + |
| 6 | +import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon'; |
| 7 | +import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon'; |
| 8 | +import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon'; |
| 9 | +import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon'; |
| 10 | +import imgBrand from '@patternfly/react-core/src/demos/examples/pfColorLogo.svg'; |
| 11 | +import imgAvatar from '@patternfly/react-core/src/components/Avatar/examples/avatarImg.svg'; |
| 12 | +import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon'; |
| 13 | +import AttentionBellIcon from '@patternfly/react-icons/dist/esm/icons/attention-bell-icon'; |
| 14 | +import LightbulbIcon from '@patternfly/react-icons/dist/esm/icons/lightbulb-icon'; |
| 15 | + |
| 16 | +- All examples set the `isManagedSidebar` prop on the Page component to have the sidebar automatically close for smaller screen widths. You can also manually control this behavior by not adding the `isManagedSidebar` prop and instead: |
| 17 | + |
| 18 | + 1. Add an onNavToggle callback to PageHeader |
| 19 | + 2. Pass a boolean into the isNavOpen prop to PageSidebar |
| 20 | + |
| 21 | +- To make the page take up the full height, it is recommended to set the height of all ancestor elements up to the page component to `100%` |
| 22 | + |
| 23 | +## Layouts |
| 24 | + |
| 25 | +This demonstrates a variety of navigation patterns in the context of a full page layout. These can be used as a basis for choosing the most appropriate page template for your application. |
| 26 | + |
| 27 | +### Sticky section group |
| 28 | + |
| 29 | +```ts file='./examples/Page/PageStickySectionGroup.tsx' isFullscreen |
| 30 | +``` |
| 31 | + |
| 32 | +### Sticky section group (alternate syntax) |
| 33 | + |
| 34 | +```ts file='./examples/Page/PageStickySectionGroupAlternate.tsx' isFullscreen |
| 35 | +``` |
| 36 | + |
| 37 | +### Sticky section group (using PageHeader) |
| 38 | + |
| 39 | +This demo is provided becuase PageHeader and PageHeaderTools are still in use; however, going forward Masthead and Toolbar should be used to make headers rather than PageHeader and PageHeaderTools. |
| 40 | + |
| 41 | +```ts file='./examples/Page/PageStickySectionGroupUsingPageHeader.tsx' isFullscreen |
| 42 | +``` |
| 43 | + |
| 44 | +### Sticky section breadcrumb (with breakpoints) |
| 45 | + |
| 46 | +```ts file='./examples/Page/PageStickySectionBreadcrumb.tsx' isFullscreen |
| 47 | +``` |
0 commit comments