You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0e22c38
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: packages/react-core/src/components/Page/examples/Page.md
+24-12Lines changed: 24 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,18 +33,6 @@ The `<MastheadMain>` component includes the smaller area that typically contains
33
33
- 1 or more `<PageSidebarBody>` components inside `<PageSidebar>` for vertical navigation or other sidebar content
34
34
- 1 or more `<PageSection>` components
35
35
36
-
### Page header and footer
37
-
38
-
To use a page header instead of passing a [masthead](/components/masthead) directly, pass a `<PageHeader>` to the `masthead` property. `<PageHeader>` should only be used to wrap custom header content.
39
-
40
-
`<PageFooter>` can be passed to the `footer` property, and should be used to wrap custom footer content.
41
-
42
-
When using a custom `<PageHeader>` and `<PageFooter>`, the `isPlain` flag should be passed to `<Page>`. This will remove styling on the main container, the height constraints on the page wrapper (so it can grow beyond the viewport), and remove the scroll management from the content section so the window will be what scrolls.
43
-
44
-
```ts file="./PageHeaderAndFooterContent.tsx"
45
-
46
-
```
47
-
48
36
### Vertical navigation
49
37
50
38
To add a vertical sidebar to a `<Page>`, pass a `<PageSidebar>` component into the `sidebar` property. To render navigation in the sidebar, pass a `<PageSidebarBody>` component to `<PageSidebar>`.
@@ -162,3 +150,27 @@ In this example, a scroll event listener on the scroll parent container toggles
162
150
```ts file="./PageDynamicStickySection.tsx"
163
151
164
152
```
153
+
154
+
### Custom header
155
+
156
+
To use a page header instead of passing a [masthead](/components/masthead) directly, pass a `<PageHeader>` to the `masthead` property. `<PageHeader>` should only be used to wrap custom header content.
157
+
158
+
```ts isBeta file="./PageCustomHeader.tsx"
159
+
160
+
```
161
+
162
+
### Footer
163
+
164
+
`<PageFooter>` can be passed to the `footer` property, and should be used to wrap custom footer content.
165
+
166
+
```ts isBeta file="./PageCustomFooter.tsx"
167
+
168
+
```
169
+
170
+
### Plain page
171
+
172
+
When a page should not have the default content area background or overflow scrolling, pass the `isPlain` property to `<Page>`.
Copy file name to clipboardExpand all lines: packages/react-core/src/demos/Page.md
+25-2Lines changed: 25 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,10 +12,27 @@ import imgAvatar from '@patternfly/react-core/src/components/assets/avatarImg.sv
12
12
import RhUiMenuBarsIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-menu-bars-icon';
13
13
import LightbulbIcon from '@patternfly/react-icons/dist/esm/icons/lightbulb-icon';
14
14
import RhUiEllipsisVerticalFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-ellipsis-vertical-fill-icon';
15
-
import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
15
+
import RhUiContainerIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-container-icon';
16
16
import RhUiCloudFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-cloud-fill-icon';
17
+
import RhUiPortIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-port-icon';
18
+
import RhUiAutomationIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-automation-icon';
19
+
import RhUiConnectedIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-connected-icon';
20
+
import RhUiArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-arrow-right-icon';
21
+
import RhUiAddCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-add-circle-fill-icon';
22
+
import RhUiTrashFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-trash-fill-icon';
23
+
import RhUiThumbnailViewSmallFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-thumbnail-view-small-fill-icon';
17
24
import pfLogo from '@patternfly/react-core/src/demos/assets/PF-HorizontalLogo-Color.svg';
18
-
import pfIconLogo from '@patternfly/react-core/src/demos/assets/PF-IconLogo-color.svg';
25
+
import pfIcon from '@patternfly/react-core/src/demos/assets/PF-IconLogo.svg';
26
+
import activeMQIcon from '@patternfly/react-core/src/demos/assets/activemq-core_200x150.png';
27
+
import avroIcon from '@patternfly/react-core/src/demos/assets/camel-avro_200x150.png';
28
+
import dropBoxIcon from '@patternfly/react-core/src/demos/assets/camel-dropbox_200x150.png';
29
+
import infinispanIcon from '@patternfly/react-core/src/demos/assets/camel-infinispan_200x150.png';
30
+
import saxonIcon from '@patternfly/react-core/src/demos/assets/camel-saxon_200x150.png';
31
+
import sparkIcon from '@patternfly/react-core/src/demos/assets/camel-spark_200x150.png';
32
+
import swaggerIcon from '@patternfly/react-core/src/demos/assets/camel-swagger-java_200x150.png';
33
+
import azureIcon from '@patternfly/react-core/src/demos/assets/FuseConnector_Icons_AzureServices.png';
34
+
import restIcon from '@patternfly/react-core/src/demos/assets/FuseConnector_Icons_REST.png';
35
+
import { data } from '@patternfly/react-core/src/demos/CardView/examples/CardViewData.jsx';
19
36
20
37
- 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:
21
38
1. Add an onNavToggle callback to PageHeader
@@ -50,3 +67,9 @@ When adding a context selector/perspective switcher in a `PageSidebar`, you must
0 commit comments