@patternfly/react-docs 7.6.0-prerelease.8 → 7.6.0-prerelease.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/LICENSE +21 -0
- package/package.json +12 -11
- package/patternfly-docs/generated/components/about-modal/react.js +0 -149
- package/patternfly-docs/generated/components/accordion/react.js +0 -262
- package/patternfly-docs/generated/components/action-list/react.js +0 -144
- package/patternfly-docs/generated/components/alert/react-demos.js +0 -56
- package/patternfly-docs/generated/components/alert/react.js +0 -1433
- package/patternfly-docs/generated/components/avatar/react.js +0 -166
- package/patternfly-docs/generated/components/back-to-top/react-demos.js +0 -60
- package/patternfly-docs/generated/components/back-to-top/react.js +0 -77
- package/patternfly-docs/generated/components/backdrop/react.js +0 -64
- package/patternfly-docs/generated/components/background-image/react.js +0 -62
- package/patternfly-docs/generated/components/badge/react.js +0 -97
- package/patternfly-docs/generated/components/banner/react-demos.js +0 -57
- package/patternfly-docs/generated/components/banner/react.js +0 -148
- package/patternfly-docs/generated/components/brand/react.js +0 -142
- package/patternfly-docs/generated/components/breadcrumb/react.js +0 -206
- package/patternfly-docs/generated/components/button/react-demos.js +0 -57
- package/patternfly-docs/generated/components/button/react.js +0 -826
- package/patternfly-docs/generated/components/card/react-demos.js +0 -201
- package/patternfly-docs/generated/components/card/react.js +0 -1015
- package/patternfly-docs/generated/components/charts/area-chart/-Victory.js +0 -1350
- package/patternfly-docs/generated/components/charts/bar-chart/-Victory.js +0 -1334
- package/patternfly-docs/generated/components/charts/box-plot-chart/-Victory.js +0 -1282
- package/patternfly-docs/generated/components/charts/bullet-chart/-Victory.js +0 -848
- package/patternfly-docs/generated/components/charts/colors-for-charts/-Victory.js +0 -192
- package/patternfly-docs/generated/components/charts/donut-chart/-Victory.js +0 -426
- package/patternfly-docs/generated/components/charts/donut-utilization-chart/-Victory.js +0 -804
- package/patternfly-docs/generated/components/charts/legends/-Victory.js +0 -3230
- package/patternfly-docs/generated/components/charts/line-chart/-Victory.js +0 -1178
- package/patternfly-docs/generated/components/charts/line-chart/ECharts.js +0 -525
- package/patternfly-docs/generated/components/charts/patterns/-Victory.js +0 -3382
- package/patternfly-docs/generated/components/charts/pie-chart/-Victory.js +0 -377
- package/patternfly-docs/generated/components/charts/resize-observer/-Victory.js +0 -2475
- package/patternfly-docs/generated/components/charts/sankey-chart/ECharts.js +0 -538
- package/patternfly-docs/generated/components/charts/scatter-chart/-Victory.js +0 -1551
- package/patternfly-docs/generated/components/charts/skeletons/-Victory.js +0 -4115
- package/patternfly-docs/generated/components/charts/sparkline-chart/-Victory.js +0 -955
- package/patternfly-docs/generated/components/charts/stack-chart/-Victory.js +0 -1173
- package/patternfly-docs/generated/components/charts/threshold-chart/-Victory.js +0 -1166
- package/patternfly-docs/generated/components/charts/tooltips/-Victory.js +0 -413
- package/patternfly-docs/generated/components/chip/react-deprecated.js +0 -323
- package/patternfly-docs/generated/components/clipboard-copy/react.js +0 -373
- package/patternfly-docs/generated/components/code-block/react.js +0 -148
- package/patternfly-docs/generated/components/code-editor/react.js +0 -659
- package/patternfly-docs/generated/components/compass/react-demos.js +0 -147
- package/patternfly-docs/generated/components/compass/react.js +0 -440
- package/patternfly-docs/generated/components/content/react.js +0 -248
- package/patternfly-docs/generated/components/data-list/react-demos.js +0 -90
- package/patternfly-docs/generated/components/data-list/react.js +0 -709
- package/patternfly-docs/generated/components/date-and-time/calendar-month/react.js +0 -283
- package/patternfly-docs/generated/components/date-and-time/date-and-time-picker/react-demos.js +0 -64
- package/patternfly-docs/generated/components/date-and-time/date-picker/react-demos.js +0 -83
- package/patternfly-docs/generated/components/date-and-time/date-picker/react.js +0 -395
- package/patternfly-docs/generated/components/date-and-time/time-picker/react.js +0 -241
- package/patternfly-docs/generated/components/description-list/react-demos.js +0 -58
- package/patternfly-docs/generated/components/description-list/react.js +0 -743
- package/patternfly-docs/generated/components/divider/react.js +0 -126
- package/patternfly-docs/generated/components/drag-and-drop/react-demos.js +0 -351
- package/patternfly-docs/generated/components/drag-and-drop/react-deprecated.js +0 -184
- package/patternfly-docs/generated/components/drag-and-drop/react.js +0 -137
- package/patternfly-docs/generated/components/drawer/react.js +0 -598
- package/patternfly-docs/generated/components/dual-list-selector/react-deprecated.js +0 -772
- package/patternfly-docs/generated/components/dual-list-selector/react.js +0 -594
- package/patternfly-docs/generated/components/empty-state/react.js +0 -199
- package/patternfly-docs/generated/components/expandable-section/react-demos.js +0 -65
- package/patternfly-docs/generated/components/expandable-section/react.js +0 -408
- package/patternfly-docs/generated/components/file-upload/multiple-file-upload/react-demos.js +0 -52
- package/patternfly-docs/generated/components/file-upload/multiple-file-upload/react.js +0 -398
- package/patternfly-docs/generated/components/file-upload/simple-file-upload/react.js +0 -749
- package/patternfly-docs/generated/components/forms/checkbox/react.js +0 -222
- package/patternfly-docs/generated/components/forms/form/react.js +0 -1106
- package/patternfly-docs/generated/components/forms/form-select/react.js +0 -208
- package/patternfly-docs/generated/components/forms/radio/react.js +0 -212
- package/patternfly-docs/generated/components/forms/text-area/react.js +0 -160
- package/patternfly-docs/generated/components/forms/text-input/react.js +0 -216
- package/patternfly-docs/generated/components/helper-text/react-demos.js +0 -180
- package/patternfly-docs/generated/components/helper-text/react.js +0 -164
- package/patternfly-docs/generated/components/hero/react.js +0 -88
- package/patternfly-docs/generated/components/hint/react.js +0 -169
- package/patternfly-docs/generated/components/icon/react.js +0 -215
- package/patternfly-docs/generated/components/input-group/react.js +0 -182
- package/patternfly-docs/generated/components/jump-links/react-demos.js +0 -154
- package/patternfly-docs/generated/components/jump-links/react.js +0 -212
- package/patternfly-docs/generated/components/label/react-demos.js +0 -57
- package/patternfly-docs/generated/components/label/react.js +0 -417
- package/patternfly-docs/generated/components/list/react.js +0 -175
- package/patternfly-docs/generated/components/login-page/react.js +0 -587
- package/patternfly-docs/generated/components/masthead/react-demos.js +0 -79
- package/patternfly-docs/generated/components/masthead/react.js +0 -291
- package/patternfly-docs/generated/components/menus/application-launcher/react-demos.js +0 -769
- package/patternfly-docs/generated/components/menus/context-selector/react-demos.js +0 -665
- package/patternfly-docs/generated/components/menus/custom-menus/react-demos.js +0 -187
- package/patternfly-docs/generated/components/menus/dropdown/react-templates.js +0 -163
- package/patternfly-docs/generated/components/menus/dropdown/react.js +0 -998
- package/patternfly-docs/generated/components/menus/menu/react.js +0 -1540
- package/patternfly-docs/generated/components/menus/menu-toggle/react.js +0 -747
- package/patternfly-docs/generated/components/menus/options-menu/react-demos.js +0 -508
- package/patternfly-docs/generated/components/menus/select/react-templates.js +0 -257
- package/patternfly-docs/generated/components/menus/select/react.js +0 -998
- package/patternfly-docs/generated/components/modal/react-deprecated.js +0 -554
- package/patternfly-docs/generated/components/modal/react.js +0 -597
- package/patternfly-docs/generated/components/navigation/react-demos.js +0 -356
- package/patternfly-docs/generated/components/navigation/react.js +0 -409
- package/patternfly-docs/generated/components/notification-badge/react.js +0 -196
- package/patternfly-docs/generated/components/notification-drawer/react-demos.js +0 -107
- package/patternfly-docs/generated/components/notification-drawer/react.js +0 -394
- package/patternfly-docs/generated/components/number-input/react.js +0 -210
- package/patternfly-docs/generated/components/overflow-menu/react.js +0 -274
- package/patternfly-docs/generated/components/page/react-demos.js +0 -149
- package/patternfly-docs/generated/components/page/react.js +0 -1352
- package/patternfly-docs/generated/components/pagination/react.js +0 -492
- package/patternfly-docs/generated/components/panel/react.js +0 -236
- package/patternfly-docs/generated/components/popover/react.js +0 -390
- package/patternfly-docs/generated/components/progress/react-demos.js +0 -59
- package/patternfly-docs/generated/components/progress/react.js +0 -283
- package/patternfly-docs/generated/components/progress-stepper/react-demos.js +0 -45
- package/patternfly-docs/generated/components/progress-stepper/react.js +0 -219
- package/patternfly-docs/generated/components/search-input/react-demos.js +0 -113
- package/patternfly-docs/generated/components/search-input/react.js +0 -263
- package/patternfly-docs/generated/components/sidebar/react.js +0 -236
- package/patternfly-docs/generated/components/simple-list/react.js +0 -200
- package/patternfly-docs/generated/components/skeleton/react-demos.js +0 -44
- package/patternfly-docs/generated/components/skeleton/react.js +0 -122
- package/patternfly-docs/generated/components/skip-to-content/react.js +0 -73
- package/patternfly-docs/generated/components/slider/react.js +0 -309
- package/patternfly-docs/generated/components/spinner/react.js +0 -111
- package/patternfly-docs/generated/components/switch/react.js +0 -163
- package/patternfly-docs/generated/components/table/react-demos.js +0 -355
- package/patternfly-docs/generated/components/table/react-deprecated.js +0 -1350
- package/patternfly-docs/generated/components/table/react.js +0 -3241
- package/patternfly-docs/generated/components/tabs/react-demos.js +0 -108
- package/patternfly-docs/generated/components/tabs/react.js +0 -1359
- package/patternfly-docs/generated/components/text-input-group/react-demos.js +0 -152
- package/patternfly-docs/generated/components/text-input-group/react.js +0 -278
- package/patternfly-docs/generated/components/tile/react-deprecated.js +0 -242
- package/patternfly-docs/generated/components/timestamp/react.js +0 -283
- package/patternfly-docs/generated/components/title/react.js +0 -94
- package/patternfly-docs/generated/components/toggle-group/react.js +0 -299
- package/patternfly-docs/generated/components/toolbar/react-demos.js +0 -66
- package/patternfly-docs/generated/components/toolbar/react.js +0 -932
- package/patternfly-docs/generated/components/tooltip/react.js +0 -241
- package/patternfly-docs/generated/components/tree-view/react.js +0 -429
- package/patternfly-docs/generated/components/truncate/react.js +0 -211
- package/patternfly-docs/generated/components/wizard/react-demos.js +0 -87
- package/patternfly-docs/generated/components/wizard/react-deprecated.js +0 -788
- package/patternfly-docs/generated/components/wizard/react.js +0 -986
- package/patternfly-docs/generated/developer-guides/open-ui-automation/react.js +0 -285
- package/patternfly-docs/generated/foundations-and-styles/layouts/bullseye/react.js +0 -70
- package/patternfly-docs/generated/foundations-and-styles/layouts/flex/react.js +0 -506
- package/patternfly-docs/generated/foundations-and-styles/layouts/gallery/react.js +0 -94
- package/patternfly-docs/generated/foundations-and-styles/layouts/grid/react.js +0 -272
- package/patternfly-docs/generated/foundations-and-styles/layouts/level/react.js +0 -87
- package/patternfly-docs/generated/foundations-and-styles/layouts/split/react.js +0 -124
- package/patternfly-docs/generated/foundations-and-styles/layouts/stack/react.js +0 -112
- package/patternfly-docs/generated/index.js +0 -1769
- package/patternfly-docs/generated/patterns/card-view/react-demos.js +0 -78
- package/patternfly-docs/generated/patterns/filters/react-demos.js +0 -141
- package/patternfly-docs/generated/patterns/password-generator/react-demos.js +0 -51
- package/patternfly-docs/generated/patterns/password-strength/react-demos.js +0 -61
- package/patternfly-docs/generated/patterns/primary-detail/react-demos.js +0 -124
- package/patternfly-docs/generated/patterns/right-to-left/react-demos.js +0 -81
|
@@ -1,1352 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AutoLinkHeader, Example, Link as PatternflyThemeLink } from '@patternfly/documentation-framework/components';
|
|
3
|
-
import { useState, useLayoutEffect, useRef } from 'react';
|
|
4
|
-
import RhUiMenuBarsIcon from '@patternfly/react-icons/dist/js/icons/rh-ui-menu-bars-icon';
|
|
5
|
-
import pageSectionWidthLimitMaxWidth from '@patternfly/react-tokens/dist/esm/c_page_section_m_limit_width_MaxWidth';
|
|
6
|
-
const pageData = {
|
|
7
|
-
"id": "Page",
|
|
8
|
-
"section": "components",
|
|
9
|
-
"subsection": "",
|
|
10
|
-
"deprecated": false,
|
|
11
|
-
"template": false,
|
|
12
|
-
"beta": false,
|
|
13
|
-
"demo": false,
|
|
14
|
-
"newImplementationLink": false,
|
|
15
|
-
"source": "react",
|
|
16
|
-
"tabName": null,
|
|
17
|
-
"slug": "/components/page/react",
|
|
18
|
-
"sourceLink": "https://github.com/patternfly/patternfly-react/blob/main/packages/react-core/src/components/Page/examples/Page.md",
|
|
19
|
-
"relPath": "packages/react-core/src/components/Page/examples/Page.md",
|
|
20
|
-
"propComponents": [
|
|
21
|
-
{
|
|
22
|
-
"name": "Page",
|
|
23
|
-
"description": "",
|
|
24
|
-
"props": [
|
|
25
|
-
{
|
|
26
|
-
"name": "additionalGroupedContent",
|
|
27
|
-
"type": "React.ReactNode",
|
|
28
|
-
"description": "Additional content of the group"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"name": "banner",
|
|
32
|
-
"type": "React.ReactNode",
|
|
33
|
-
"description": "Banner component for the page. This will be rendered above a breadcrumb if one is also passed."
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"name": "breadcrumb",
|
|
37
|
-
"type": "React.ReactNode",
|
|
38
|
-
"description": "Breadcrumb component for the page"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"name": "breadcrumbProps",
|
|
42
|
-
"type": "PageBreadcrumbProps",
|
|
43
|
-
"description": "Additional props of the breadcrumb"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"name": "children",
|
|
47
|
-
"type": "React.ReactNode",
|
|
48
|
-
"description": "Content rendered inside the main section of the page layout (e.g. <PageSection />)"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"name": "className",
|
|
52
|
-
"type": "string",
|
|
53
|
-
"description": "Additional classes added to the page layout"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"name": "defaultManagedSidebarIsOpen",
|
|
57
|
-
"type": "boolean",
|
|
58
|
-
"description": "If true, the managed sidebar is initially open for desktop view",
|
|
59
|
-
"defaultValue": "true"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"name": "dockContent",
|
|
63
|
-
"type": "React.ReactNode",
|
|
64
|
-
"description": "Content to render in the vertical dock when variant of docked is used. At mobile viewports, this content will be replaced with the content passed to masthead.",
|
|
65
|
-
"beta": true
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"name": "drawerDefaultSize",
|
|
69
|
-
"type": "string",
|
|
70
|
-
"description": "Sets default drawer size"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"name": "drawerMaxSize",
|
|
74
|
-
"type": "string",
|
|
75
|
-
"description": "Sets the maximum drawer size"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"name": "drawerMinSize",
|
|
79
|
-
"type": "string",
|
|
80
|
-
"description": "Sets the minimum drawer size"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"name": "getBreakpoint",
|
|
84
|
-
"type": "(width: number | null) => 'default' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'",
|
|
85
|
-
"description": "The page resize observer uses the breakpoints returned from this function when adding the pf-m-breakpoint-[default|sm|md|lg|xl|2xl] class\nYou can override the default getBreakpoint function to return breakpoints at different sizes than the default\nYou can view the default getBreakpoint function here:\nhttps://github.com/patternfly/patternfly-react/blob/main/packages/react-core/src/helpers/util.ts",
|
|
86
|
-
"defaultValue": "(width: number): 'default' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' => {\n if (width === null) {\n return null;\n }\n if (width >= globalWidthBreakpoints['2xl']) {\n return '2xl';\n }\n if (width >= globalWidthBreakpoints.xl) {\n return 'xl';\n }\n if (width >= globalWidthBreakpoints.lg) {\n return 'lg';\n }\n if (width >= globalWidthBreakpoints.md) {\n return 'md';\n }\n if (width >= globalWidthBreakpoints.sm) {\n return 'sm';\n }\n return 'default';\n}"
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"name": "getVerticalBreakpoint",
|
|
90
|
-
"type": "(height: number | null) => 'default' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'",
|
|
91
|
-
"description": "The page resize observer uses the breakpoints returned from this function when adding the pf-m-breakpoint-[default|sm|md|lg|xl|2xl] class\nYou can override the default getVerticalBreakpoint function to return breakpoints at different sizes than the default\nYou can view the default getVerticalBreakpoint function here:\nhttps://github.com/patternfly/patternfly-react/blob/main/packages/react-core/src/helpers/util.ts",
|
|
92
|
-
"defaultValue": "(height: number): 'default' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' => {\n if (height === null) {\n return null;\n }\n if (height >= globalHeightBreakpoints['2xl']) {\n return '2xl';\n }\n if (height >= globalHeightBreakpoints.xl) {\n return 'xl';\n }\n if (height >= globalHeightBreakpoints.lg) {\n return 'lg';\n }\n if (height >= globalHeightBreakpoints.md) {\n return 'md';\n }\n if (height >= globalHeightBreakpoints.sm) {\n return 'sm';\n }\n return 'default';\n}"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"name": "groupProps",
|
|
96
|
-
"type": "PageGroupProps",
|
|
97
|
-
"description": "Additional props of the group"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"name": "horizontalSubnav",
|
|
101
|
-
"type": "React.ReactNode",
|
|
102
|
-
"description": "Horizontal sub navigation component for the page"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"name": "isBreadcrumbGrouped",
|
|
106
|
-
"type": "boolean",
|
|
107
|
-
"description": "Flag indicating if the breadcrumb should be in a group"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"name": "isBreadcrumbWidthLimited",
|
|
111
|
-
"type": "boolean",
|
|
112
|
-
"description": "Flag indicating if breadcrumb width should be limited",
|
|
113
|
-
"defaultValue": "false"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"name": "isContentFilled",
|
|
117
|
-
"type": "boolean",
|
|
118
|
-
"description": "Enables children to fill the available vertical space. Child page sections or groups that should fill should be passed the isFilled property."
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"name": "isDockExpanded",
|
|
122
|
-
"type": "boolean",
|
|
123
|
-
"description": "Flag indicating the docked nav is expanded on mobile. Only applies when variant is docked.",
|
|
124
|
-
"beta": true
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"name": "isDockTextExpanded",
|
|
128
|
-
"type": "boolean",
|
|
129
|
-
"description": "Flag indicating the docked nav should display text on desktop. Only applies when variant is docked, and\nwill handle toggling the visibility of the text in individual isDocked components.",
|
|
130
|
-
"beta": true
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
"name": "isHorizontalSubnavGrouped",
|
|
134
|
-
"type": "boolean",
|
|
135
|
-
"description": "Flag indicating if the horizontal sub navigation should be in a group"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"name": "isHorizontalSubnavWidthLimited",
|
|
139
|
-
"type": "boolean",
|
|
140
|
-
"description": "Flag indicating if horizontal sub navigation width should be limited"
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"name": "isManagedSidebar",
|
|
144
|
-
"type": "boolean",
|
|
145
|
-
"description": "If true, manages the sidebar open/close state and there is no need to pass the isSidebarOpen boolean into\nthe sidebar component or add a callback onSidebarToggle function into the Masthead component",
|
|
146
|
-
"defaultValue": "false"
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"name": "isNotificationDrawerExpanded",
|
|
150
|
-
"type": "boolean",
|
|
151
|
-
"description": "Flag indicating Notification drawer in expanded",
|
|
152
|
-
"defaultValue": "false"
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
"name": "mainAriaLabel",
|
|
156
|
-
"type": "string",
|
|
157
|
-
"description": "Accessible label, can be used to name main section"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"name": "mainComponent",
|
|
161
|
-
"type": "'main' | 'div'",
|
|
162
|
-
"description": "HTML component used as main component of the page. Defaults to 'main', only pass in 'div' if another 'main' element already exists.",
|
|
163
|
-
"defaultValue": "'main'"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"name": "mainContainerId",
|
|
167
|
-
"type": "string",
|
|
168
|
-
"description": "an id to use for the [role=\"main\"] element"
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"name": "mainTabIndex",
|
|
172
|
-
"type": "number | null",
|
|
173
|
-
"description": "tabIndex to use for the [role=\"main\"] element, null to unset it",
|
|
174
|
-
"defaultValue": "-1"
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
"name": "masthead",
|
|
178
|
-
"type": "React.ReactNode",
|
|
179
|
-
"description": "The horizontal masthead content (e.g. <Masthead />). When using the docked variant, this content will only render at mobile viewports."
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
"name": "notificationDrawer",
|
|
183
|
-
"type": "React.ReactNode",
|
|
184
|
-
"description": "Notification drawer component for an optional notification drawer (e.g. <NotificationDrawer />)"
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
"name": "onNotificationDrawerExpand",
|
|
188
|
-
"type": "(event: KeyboardEvent | React.MouseEvent | React.TransitionEvent) => void",
|
|
189
|
-
"description": "Callback when notification drawer panel is finished expanding.",
|
|
190
|
-
"defaultValue": "() => null"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"name": "onPageResize",
|
|
194
|
-
"type": "((event: MouseEvent | TouchEvent | React.KeyboardEvent, object: any) => void) | null",
|
|
195
|
-
"description": "Can add callback to be notified when resize occurs, for example to set the sidebar isSidebarOpen prop to false for a width < 768px\nReturns object { mobileView: boolean, windowSize: number }"
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
"name": "role",
|
|
199
|
-
"type": "string",
|
|
200
|
-
"description": "Sets the value for role on the <main> element"
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
"name": "sidebar",
|
|
204
|
-
"type": "React.ReactNode",
|
|
205
|
-
"description": "Sidebar component for a side nav, recommended to be a PageSidebar. If set to null, the page grid layout\nwill render without a sidebar."
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"name": "skipToContent",
|
|
209
|
-
"type": "React.ReactElement<any>",
|
|
210
|
-
"description": "Skip to content component for the page"
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
"name": "variant",
|
|
214
|
-
"type": "'default' | 'docked'",
|
|
215
|
-
"description": "Indicates the layout variant",
|
|
216
|
-
"beta": true
|
|
217
|
-
}
|
|
218
|
-
]
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
"name": "PageSidebar",
|
|
222
|
-
"description": "",
|
|
223
|
-
"props": [
|
|
224
|
-
{
|
|
225
|
-
"name": "children",
|
|
226
|
-
"type": "React.ReactNode",
|
|
227
|
-
"description": "Content rendered inside the page sidebar (e.g. <PageSidebarBody />"
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
"name": "className",
|
|
231
|
-
"type": "string",
|
|
232
|
-
"description": "Additional classes added to the page sidebar",
|
|
233
|
-
"defaultValue": "''"
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
"name": "id",
|
|
237
|
-
"type": "string",
|
|
238
|
-
"description": "Sidebar id",
|
|
239
|
-
"defaultValue": "'page-sidebar'"
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
"name": "isManagedSidebar",
|
|
243
|
-
"type": "boolean",
|
|
244
|
-
"description": "If true, manages the sidebar open/close state and there is no need to pass the isSidebarOpen boolean into\nthe sidebar component or add a callback onSidebarToggle function into the Masthead component"
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
"name": "isSidebarOpen",
|
|
248
|
-
"type": "boolean",
|
|
249
|
-
"description": "Programmatically manage if the sidebar is shown, if isManagedSidebar is set to true in the Page component, this prop is managed",
|
|
250
|
-
"defaultValue": "true"
|
|
251
|
-
}
|
|
252
|
-
]
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
"name": "PageSidebarBody",
|
|
256
|
-
"description": "",
|
|
257
|
-
"props": [
|
|
258
|
-
{
|
|
259
|
-
"name": "children",
|
|
260
|
-
"type": "React.ReactNode",
|
|
261
|
-
"description": "Content rendered inside the page sidebar body"
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
"name": "className",
|
|
265
|
-
"type": "string",
|
|
266
|
-
"description": "Additional classes added to the page sidebar body"
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
"name": "isContextSelector",
|
|
270
|
-
"type": "boolean",
|
|
271
|
-
"description": "Flag indicating that the page sidebar body is for a context selector/perspective switcher"
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
"name": "isFilled",
|
|
275
|
-
"type": "boolean",
|
|
276
|
-
"description": "Flag indicating that the page sidebar body should fill the available vertical space."
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
"name": "usePageInsets",
|
|
280
|
-
"type": "boolean",
|
|
281
|
-
"description": "Flag indicating that the page sidebar body should use page insets."
|
|
282
|
-
}
|
|
283
|
-
]
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
"name": "PageSection",
|
|
287
|
-
"description": "",
|
|
288
|
-
"props": [
|
|
289
|
-
{
|
|
290
|
-
"name": "aria-label",
|
|
291
|
-
"type": "string",
|
|
292
|
-
"description": "Adds an accessible name to the page section. Required when the hasOverflowScroll prop is set to true.\nThis prop should also be passed in if a heading is not being used to describe the content of the page section."
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
"name": "children",
|
|
296
|
-
"type": "React.ReactNode",
|
|
297
|
-
"description": "Content rendered inside the section"
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
"name": "className",
|
|
301
|
-
"type": "string",
|
|
302
|
-
"description": "Additional classes added to the section",
|
|
303
|
-
"defaultValue": "''"
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
"name": "component",
|
|
307
|
-
"type": "React.JSX.IntrinsicElements",
|
|
308
|
-
"description": "Sets the base component to render. Defaults to section",
|
|
309
|
-
"defaultValue": "'section'"
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
"name": "hasBodyWrapper",
|
|
313
|
-
"type": "boolean",
|
|
314
|
-
"description": "Flag indicating whether children passed to the component should be wrapped by a PageBody.\nSet this to false in order to pass multiple, custom PageBody's as children.",
|
|
315
|
-
"defaultValue": "true",
|
|
316
|
-
"beta": true
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
"name": "hasOverflowScroll",
|
|
320
|
-
"type": "boolean",
|
|
321
|
-
"description": "Flag indicating if the PageSection has a scrolling overflow",
|
|
322
|
-
"defaultValue": "false"
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
"name": "hasShadowBottom",
|
|
326
|
-
"type": "boolean",
|
|
327
|
-
"description": "Modifier indicating if PageSection should have a shadow at the bottom",
|
|
328
|
-
"defaultValue": "false"
|
|
329
|
-
},
|
|
330
|
-
{
|
|
331
|
-
"name": "hasShadowTop",
|
|
332
|
-
"type": "boolean",
|
|
333
|
-
"description": "Modifier indicating if PageSection should have a shadow at the top",
|
|
334
|
-
"defaultValue": "false"
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
"name": "isCenterAligned",
|
|
338
|
-
"type": "boolean",
|
|
339
|
-
"description": "Flag indicating if the section content is center aligned. isWidthLimited must be set for this to work",
|
|
340
|
-
"defaultValue": "false"
|
|
341
|
-
},
|
|
342
|
-
{
|
|
343
|
-
"name": "isFilled",
|
|
344
|
-
"type": "boolean",
|
|
345
|
-
"description": "Enables the page section to fill the available vertical space if true, or disable filling if false."
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
"name": "isNoPlainOnGlass",
|
|
349
|
-
"type": "boolean",
|
|
350
|
-
"description": "Prevents the page section from automatically applying plain styling when glass theme is enabled.",
|
|
351
|
-
"defaultValue": "false",
|
|
352
|
-
"beta": true
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
"name": "isPlain",
|
|
356
|
-
"type": "boolean",
|
|
357
|
-
"description": "Adds plain styling to the page section.",
|
|
358
|
-
"defaultValue": "false"
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
"name": "isStickyStuck",
|
|
362
|
-
"type": "boolean",
|
|
363
|
-
"description": "Flag indicating if the section has stuck styling, applied when the section is not at the edge of the scroll parent container.",
|
|
364
|
-
"defaultValue": "false",
|
|
365
|
-
"beta": true
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
"name": "isWidthLimited",
|
|
369
|
-
"type": "boolean",
|
|
370
|
-
"description": "Limits the width of the section",
|
|
371
|
-
"defaultValue": "false"
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
"name": "padding",
|
|
375
|
-
"type": "{\n default?: 'padding' | 'noPadding';\n sm?: 'padding' | 'noPadding';\n md?: 'padding' | 'noPadding';\n lg?: 'padding' | 'noPadding';\n xl?: 'padding' | 'noPadding';\n '2xl'?: 'padding' | 'noPadding';\n}",
|
|
376
|
-
"description": "Padding at various breakpoints."
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
"name": "stickyBase",
|
|
380
|
-
"type": "'top' | 'bottom'",
|
|
381
|
-
"description": "Applies the base sticky positioning to the top or bottom of the scroll parent container.",
|
|
382
|
-
"beta": true
|
|
383
|
-
},
|
|
384
|
-
{
|
|
385
|
-
"name": "stickyOnBreakpoint",
|
|
386
|
-
"type": "{\n default?: 'top' | 'bottom';\n sm?: 'top' | 'bottom';\n md?: 'top' | 'bottom';\n lg?: 'top' | 'bottom';\n xl?: 'top' | 'bottom';\n '2xl'?: 'top' | 'bottom';\n}",
|
|
387
|
-
"description": "Modifier indicating if the PageBreadcrumb is sticky to the top or bottom at various breakpoints"
|
|
388
|
-
},
|
|
389
|
-
{
|
|
390
|
-
"name": "type",
|
|
391
|
-
"type": "'default' | 'subnav' | 'breadcrumb' | 'tabs' | 'wizard'",
|
|
392
|
-
"description": "Section type variant",
|
|
393
|
-
"defaultValue": "'default'"
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
"name": "variant",
|
|
397
|
-
"type": "'default' | 'secondary'",
|
|
398
|
-
"description": "Section background color variant. This will only apply when the type prop has the \"default\" value.",
|
|
399
|
-
"defaultValue": "'default'"
|
|
400
|
-
}
|
|
401
|
-
]
|
|
402
|
-
},
|
|
403
|
-
{
|
|
404
|
-
"name": "PageGroup",
|
|
405
|
-
"description": "",
|
|
406
|
-
"props": [
|
|
407
|
-
{
|
|
408
|
-
"name": "aria-label",
|
|
409
|
-
"type": "string",
|
|
410
|
-
"description": "Adds an accessible name to the page group when the hasOverflowScroll prop is set to true."
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
"name": "children",
|
|
414
|
-
"type": "React.ReactNode",
|
|
415
|
-
"description": "Content rendered inside of the PageGroup"
|
|
416
|
-
},
|
|
417
|
-
{
|
|
418
|
-
"name": "className",
|
|
419
|
-
"type": "string",
|
|
420
|
-
"description": "Additional classes to apply to the PageGroup",
|
|
421
|
-
"defaultValue": "''"
|
|
422
|
-
},
|
|
423
|
-
{
|
|
424
|
-
"name": "hasOverflowScroll",
|
|
425
|
-
"type": "boolean",
|
|
426
|
-
"description": "Flag indicating if the PageGroup has a scrolling overflow",
|
|
427
|
-
"defaultValue": "false"
|
|
428
|
-
},
|
|
429
|
-
{
|
|
430
|
-
"name": "hasShadowBottom",
|
|
431
|
-
"type": "boolean",
|
|
432
|
-
"description": "Modifier indicating if PageGroup should have a shadow at the bottom",
|
|
433
|
-
"defaultValue": "false"
|
|
434
|
-
},
|
|
435
|
-
{
|
|
436
|
-
"name": "hasShadowTop",
|
|
437
|
-
"type": "boolean",
|
|
438
|
-
"description": "Modifier indicating if PageGroup should have a shadow at the top",
|
|
439
|
-
"defaultValue": "false"
|
|
440
|
-
},
|
|
441
|
-
{
|
|
442
|
-
"name": "isFilled",
|
|
443
|
-
"type": "boolean",
|
|
444
|
-
"description": "Enables the page group to fill the available vertical space if true, or disable filling if false."
|
|
445
|
-
},
|
|
446
|
-
{
|
|
447
|
-
"name": "isNoPlainOnGlass",
|
|
448
|
-
"type": "boolean",
|
|
449
|
-
"description": "Prevents the page group from automatically applying plain styling when glass theme is enabled.",
|
|
450
|
-
"defaultValue": "false",
|
|
451
|
-
"beta": true
|
|
452
|
-
},
|
|
453
|
-
{
|
|
454
|
-
"name": "isPlain",
|
|
455
|
-
"type": "boolean",
|
|
456
|
-
"description": "Adds plain styling to the page group.",
|
|
457
|
-
"defaultValue": "false"
|
|
458
|
-
},
|
|
459
|
-
{
|
|
460
|
-
"name": "isStickyStuck",
|
|
461
|
-
"type": "boolean",
|
|
462
|
-
"description": "Flag indicating if the group has stuck styling, applied when the group is not at the edge of the scroll parent container.",
|
|
463
|
-
"defaultValue": "false",
|
|
464
|
-
"beta": true
|
|
465
|
-
},
|
|
466
|
-
{
|
|
467
|
-
"name": "stickyBase",
|
|
468
|
-
"type": "'top' | 'bottom'",
|
|
469
|
-
"description": "Applies the base sticky positioning to the top or bottom of the scroll parent container.",
|
|
470
|
-
"beta": true
|
|
471
|
-
},
|
|
472
|
-
{
|
|
473
|
-
"name": "stickyOnBreakpoint",
|
|
474
|
-
"type": "{\n default?: 'top' | 'bottom';\n sm?: 'top' | 'bottom';\n md?: 'top' | 'bottom';\n lg?: 'top' | 'bottom';\n xl?: 'top' | 'bottom';\n '2xl'?: 'top' | 'bottom';\n}",
|
|
475
|
-
"description": "Modifier indicating if the PageBreadcrumb is sticky to the top or bottom at various breakpoints"
|
|
476
|
-
}
|
|
477
|
-
]
|
|
478
|
-
},
|
|
479
|
-
{
|
|
480
|
-
"name": "PageBreadcrumb",
|
|
481
|
-
"description": "",
|
|
482
|
-
"props": [
|
|
483
|
-
{
|
|
484
|
-
"name": "aria-label",
|
|
485
|
-
"type": "string",
|
|
486
|
-
"description": "Adds an accessible name to the breadcrumb section. Required when the hasOverflowScroll prop is set to true."
|
|
487
|
-
},
|
|
488
|
-
{
|
|
489
|
-
"name": "children",
|
|
490
|
-
"type": "React.ReactNode",
|
|
491
|
-
"description": "Content rendered inside of the PageBreadcrumb"
|
|
492
|
-
},
|
|
493
|
-
{
|
|
494
|
-
"name": "className",
|
|
495
|
-
"type": "string",
|
|
496
|
-
"description": "Additional classes to apply to the PageBreadcrumb",
|
|
497
|
-
"defaultValue": "''"
|
|
498
|
-
},
|
|
499
|
-
{
|
|
500
|
-
"name": "hasBodyWrapper",
|
|
501
|
-
"type": "boolean",
|
|
502
|
-
"description": "Flag indicating whether children passed to the component should be wrapped by a PageBody.\nSet this to false in order to pass multiple, custom PageBody's as children.",
|
|
503
|
-
"defaultValue": "true",
|
|
504
|
-
"beta": true
|
|
505
|
-
},
|
|
506
|
-
{
|
|
507
|
-
"name": "hasOverflowScroll",
|
|
508
|
-
"type": "boolean",
|
|
509
|
-
"description": "Flag indicating if the PageBreadcrumb has a scrolling overflow",
|
|
510
|
-
"defaultValue": "false"
|
|
511
|
-
},
|
|
512
|
-
{
|
|
513
|
-
"name": "hasShadowBottom",
|
|
514
|
-
"type": "boolean",
|
|
515
|
-
"description": "Flag indicating if PageBreadcrumb should have a shadow at the bottom",
|
|
516
|
-
"defaultValue": "false"
|
|
517
|
-
},
|
|
518
|
-
{
|
|
519
|
-
"name": "hasShadowTop",
|
|
520
|
-
"type": "boolean",
|
|
521
|
-
"description": "Flag indicating if PageBreadcrumb should have a shadow at the top",
|
|
522
|
-
"defaultValue": "false"
|
|
523
|
-
},
|
|
524
|
-
{
|
|
525
|
-
"name": "isWidthLimited",
|
|
526
|
-
"type": "boolean",
|
|
527
|
-
"description": "Limits the width of the breadcrumb"
|
|
528
|
-
},
|
|
529
|
-
{
|
|
530
|
-
"name": "stickyOnBreakpoint",
|
|
531
|
-
"type": "{\n default?: 'top' | 'bottom';\n sm?: 'top' | 'bottom';\n md?: 'top' | 'bottom';\n lg?: 'top' | 'bottom';\n xl?: 'top' | 'bottom';\n '2xl'?: 'top' | 'bottom';\n}",
|
|
532
|
-
"description": "Modifier indicating if the PageBreadcrumb is sticky to the top or bottom at various breakpoints"
|
|
533
|
-
}
|
|
534
|
-
]
|
|
535
|
-
},
|
|
536
|
-
{
|
|
537
|
-
"name": "PageToggleButton",
|
|
538
|
-
"description": "",
|
|
539
|
-
"props": [
|
|
540
|
-
{
|
|
541
|
-
"name": "aria-label",
|
|
542
|
-
"type": "string",
|
|
543
|
-
"description": "Adds accessible text to the button.",
|
|
544
|
-
"defaultValue": "'Side navigation toggle'"
|
|
545
|
-
},
|
|
546
|
-
{
|
|
547
|
-
"name": "children",
|
|
548
|
-
"type": "React.ReactNode",
|
|
549
|
-
"description": "Content rendered inside the button"
|
|
550
|
-
},
|
|
551
|
-
{
|
|
552
|
-
"name": "className",
|
|
553
|
-
"type": "string",
|
|
554
|
-
"description": "Additional classes added to the button"
|
|
555
|
-
},
|
|
556
|
-
{
|
|
557
|
-
"name": "component",
|
|
558
|
-
"type": "React.ElementType<any> | React.ComponentType<any>",
|
|
559
|
-
"description": "Sets the base component to render. defaults to button"
|
|
560
|
-
},
|
|
561
|
-
{
|
|
562
|
-
"name": "countOptions",
|
|
563
|
-
"type": "BadgeCountObject",
|
|
564
|
-
"description": "Adds count number to button"
|
|
565
|
-
},
|
|
566
|
-
{
|
|
567
|
-
"name": "hamburgerVariant",
|
|
568
|
-
"type": "'expand' | 'collapse'",
|
|
569
|
-
"description": "Adjusts and animates the hamburger icon to indicate what will happen upon clicking the button."
|
|
570
|
-
},
|
|
571
|
-
{
|
|
572
|
-
"name": "hasNoPadding",
|
|
573
|
-
"type": "boolean",
|
|
574
|
-
"description": "Applies no padding on a plain button variant. Use when plain button is placed inline with text"
|
|
575
|
-
},
|
|
576
|
-
{
|
|
577
|
-
"name": "icon",
|
|
578
|
-
"type": "React.ReactNode | null",
|
|
579
|
-
"description": "Icon for the button."
|
|
580
|
-
},
|
|
581
|
-
{
|
|
582
|
-
"name": "iconPosition",
|
|
583
|
-
"type": "'start' | 'end' | 'left' | 'right'",
|
|
584
|
-
"description": "Sets position of the icon. Note: \"left\" and \"right\" are deprecated. Use \"start\" and \"end\" instead"
|
|
585
|
-
},
|
|
586
|
-
{
|
|
587
|
-
"name": "id",
|
|
588
|
-
"type": "string",
|
|
589
|
-
"description": "Button id",
|
|
590
|
-
"defaultValue": "'nav-toggle'"
|
|
591
|
-
},
|
|
592
|
-
{
|
|
593
|
-
"name": "inoperableEvents",
|
|
594
|
-
"type": "string[]",
|
|
595
|
-
"description": "Events to prevent when the button is in an aria-disabled state"
|
|
596
|
-
},
|
|
597
|
-
{
|
|
598
|
-
"name": "isAriaDisabled",
|
|
599
|
-
"type": "boolean",
|
|
600
|
-
"description": "Adds disabled styling and communicates that the button is disabled using the aria-disabled html attribute"
|
|
601
|
-
},
|
|
602
|
-
{
|
|
603
|
-
"name": "isBlock",
|
|
604
|
-
"type": "boolean",
|
|
605
|
-
"description": "Adds block styling to button"
|
|
606
|
-
},
|
|
607
|
-
{
|
|
608
|
-
"name": "isCircle",
|
|
609
|
-
"type": "boolean",
|
|
610
|
-
"description": "Flag indicating the button is a circle button. Intended for buttons that only contain an icon..",
|
|
611
|
-
"beta": true
|
|
612
|
-
},
|
|
613
|
-
{
|
|
614
|
-
"name": "isClicked",
|
|
615
|
-
"type": "boolean",
|
|
616
|
-
"description": "Adds clicked styling to button."
|
|
617
|
-
},
|
|
618
|
-
{
|
|
619
|
-
"name": "isDanger",
|
|
620
|
-
"type": "boolean",
|
|
621
|
-
"description": "Adds danger styling to secondary or link button variants"
|
|
622
|
-
},
|
|
623
|
-
{
|
|
624
|
-
"name": "isDisabled",
|
|
625
|
-
"type": "boolean",
|
|
626
|
-
"description": "Adds disabled styling and disables the button using the disabled html attribute"
|
|
627
|
-
},
|
|
628
|
-
{
|
|
629
|
-
"name": "isDocked",
|
|
630
|
-
"type": "boolean",
|
|
631
|
-
"description": "Flag indicating the button is a docked variant button. For use in docked navigation.",
|
|
632
|
-
"beta": true
|
|
633
|
-
},
|
|
634
|
-
{
|
|
635
|
-
"name": "isExpanded",
|
|
636
|
-
"type": "boolean",
|
|
637
|
-
"description": "Flag indicating whether content the button controls is expanded or not. Required when isHamburger is true."
|
|
638
|
-
},
|
|
639
|
-
{
|
|
640
|
-
"name": "isFavorite",
|
|
641
|
-
"type": "boolean",
|
|
642
|
-
"description": "Adds favorite styling to a button"
|
|
643
|
-
},
|
|
644
|
-
{
|
|
645
|
-
"name": "isFavorited",
|
|
646
|
-
"type": "boolean",
|
|
647
|
-
"description": "Flag indicating whether the button is favorited or not, only when isFavorite is true."
|
|
648
|
-
},
|
|
649
|
-
{
|
|
650
|
-
"name": "isHamburger",
|
|
651
|
-
"type": "boolean",
|
|
652
|
-
"description": "Flag indicating the button is a hamburger button. This will override the icon property."
|
|
653
|
-
},
|
|
654
|
-
{
|
|
655
|
-
"name": "isHamburgerButton",
|
|
656
|
-
"type": "boolean",
|
|
657
|
-
"description": "Flag indicating whether the hamburger button variation with animations should be used."
|
|
658
|
-
},
|
|
659
|
-
{
|
|
660
|
-
"name": "isInline",
|
|
661
|
-
"type": "boolean",
|
|
662
|
-
"description": "Adds inline styling to a link button"
|
|
663
|
-
},
|
|
664
|
-
{
|
|
665
|
-
"name": "isLoading",
|
|
666
|
-
"type": "boolean",
|
|
667
|
-
"description": "Adds progress styling to button"
|
|
668
|
-
},
|
|
669
|
-
{
|
|
670
|
-
"name": "isSettings",
|
|
671
|
-
"type": "boolean",
|
|
672
|
-
"description": "Flag indicating the button is a settings button. This will override the icon property."
|
|
673
|
-
},
|
|
674
|
-
{
|
|
675
|
-
"name": "isSidebarOpen",
|
|
676
|
-
"type": "boolean",
|
|
677
|
-
"description": "True if the sidebar is shown",
|
|
678
|
-
"defaultValue": "true"
|
|
679
|
-
},
|
|
680
|
-
{
|
|
681
|
-
"name": "isTextExpanded",
|
|
682
|
-
"type": "boolean",
|
|
683
|
-
"description": "Flag indicating the docked button should display text. Only applies when isDocked is true.",
|
|
684
|
-
"beta": true
|
|
685
|
-
},
|
|
686
|
-
{
|
|
687
|
-
"name": "onSidebarToggle",
|
|
688
|
-
"type": "() => void",
|
|
689
|
-
"description": "Callback function to handle the sidebar toggle button, managed by the Page component if the Page isManagedSidebar prop is set to true",
|
|
690
|
-
"defaultValue": "() => undefined as any"
|
|
691
|
-
},
|
|
692
|
-
{
|
|
693
|
-
"name": "ouiaId",
|
|
694
|
-
"type": "number | string",
|
|
695
|
-
"description": "Value to overwrite the randomly generated data-ouia-component-id."
|
|
696
|
-
},
|
|
697
|
-
{
|
|
698
|
-
"name": "ouiaSafe",
|
|
699
|
-
"type": "boolean",
|
|
700
|
-
"description": "Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false."
|
|
701
|
-
},
|
|
702
|
-
{
|
|
703
|
-
"name": "size",
|
|
704
|
-
"type": "'default' | 'sm' | 'lg'",
|
|
705
|
-
"description": "Adds styling which affects the size of the button"
|
|
706
|
-
},
|
|
707
|
-
{
|
|
708
|
-
"name": "spinnerAriaLabel",
|
|
709
|
-
"type": "string",
|
|
710
|
-
"description": "Accessible label for the spinner to describe what is loading"
|
|
711
|
-
},
|
|
712
|
-
{
|
|
713
|
-
"name": "spinnerAriaLabelledBy",
|
|
714
|
-
"type": "string",
|
|
715
|
-
"description": "Id of element which describes what is being loaded"
|
|
716
|
-
},
|
|
717
|
-
{
|
|
718
|
-
"name": "spinnerAriaValueText",
|
|
719
|
-
"type": "string",
|
|
720
|
-
"description": "Text describing that current loading status or progress"
|
|
721
|
-
},
|
|
722
|
-
{
|
|
723
|
-
"name": "state",
|
|
724
|
-
"type": "'read' | 'unread' | 'attention'",
|
|
725
|
-
"description": "Sets state of the stateful button variant. Default is \"unread\""
|
|
726
|
-
},
|
|
727
|
-
{
|
|
728
|
-
"name": "tabIndex",
|
|
729
|
-
"type": "number",
|
|
730
|
-
"description": "Sets the button tabindex."
|
|
731
|
-
},
|
|
732
|
-
{
|
|
733
|
-
"name": "type",
|
|
734
|
-
"type": "'button' | 'submit' | 'reset'",
|
|
735
|
-
"description": "Sets button type"
|
|
736
|
-
},
|
|
737
|
-
{
|
|
738
|
-
"name": "variant",
|
|
739
|
-
"type": "'primary' | 'secondary' | 'tertiary' | 'danger' | 'warning' | 'link' | 'plain' | 'control' | 'stateful'",
|
|
740
|
-
"description": "Adds button variant styles"
|
|
741
|
-
}
|
|
742
|
-
]
|
|
743
|
-
}
|
|
744
|
-
],
|
|
745
|
-
"cssPrefix": [
|
|
746
|
-
"pf-v6-c-page"
|
|
747
|
-
],
|
|
748
|
-
"examples": [
|
|
749
|
-
"Vertical navigation",
|
|
750
|
-
"Multiple sidebar body",
|
|
751
|
-
"Horizontal navigation",
|
|
752
|
-
"Uncontrolled navigation",
|
|
753
|
-
"Filled page sections",
|
|
754
|
-
"Main section padding",
|
|
755
|
-
"Main section variations",
|
|
756
|
-
"Group section",
|
|
757
|
-
"Centered section",
|
|
758
|
-
"Plain sections and groups",
|
|
759
|
-
"Dynamic sticky section"
|
|
760
|
-
]
|
|
761
|
-
};
|
|
762
|
-
pageData.liveContext = {
|
|
763
|
-
useState,
|
|
764
|
-
useLayoutEffect,
|
|
765
|
-
useRef,
|
|
766
|
-
RhUiMenuBarsIcon,
|
|
767
|
-
pageSectionWidthLimitMaxWidth
|
|
768
|
-
};
|
|
769
|
-
pageData.examples = {
|
|
770
|
-
'Vertical navigation': props =>
|
|
771
|
-
<Example {...pageData} {...props} {...{"code":"import { useState } from 'react';\nimport {\n Page,\n Masthead,\n MastheadMain,\n MastheadToggle,\n MastheadBrand,\n MastheadLogo,\n MastheadContent,\n PageSidebar,\n PageSidebarBody,\n PageSection,\n PageToggleButton,\n Toolbar,\n ToolbarContent,\n ToolbarItem\n} from '@patternfly/react-core';\n\nexport const PageVerticalNav: React.FunctionComponent = () => {\n const [isSidebarOpen, setIsSidebarOpen] = useState(true);\n\n const onSidebarToggle = () => {\n setIsSidebarOpen(!isSidebarOpen);\n };\n\n const headerToolbar = (\n <Toolbar id=\"vertical-toolbar\">\n <ToolbarContent>\n <ToolbarItem>header-tools</ToolbarItem>\n </ToolbarContent>\n </Toolbar>\n );\n\n const masthead = (\n <Masthead>\n <MastheadMain>\n <MastheadToggle>\n <PageToggleButton\n isHamburgerButton\n aria-label=\"Global navigation\"\n isSidebarOpen={isSidebarOpen}\n onSidebarToggle={onSidebarToggle}\n id=\"vertical-nav-toggle\"\n />\n </MastheadToggle>\n <MastheadBrand>\n <MastheadLogo href=\"https://patternfly.org\" target=\"_blank\">\n Logo\n </MastheadLogo>\n </MastheadBrand>\n </MastheadMain>\n <MastheadContent>{headerToolbar}</MastheadContent>\n </Masthead>\n );\n\n const sidebar = (\n <PageSidebar isSidebarOpen={isSidebarOpen} id=\"vertical-sidebar\">\n <PageSidebarBody>Navigation</PageSidebarBody>\n </PageSidebar>\n );\n\n return (\n <Page masthead={masthead} sidebar={sidebar}>\n <PageSection aria-labelledby=\"section-1\">\n <h2 id=\"section-1\">Vertical nav example section 1</h2>\n </PageSection>\n <PageSection variant=\"secondary\" aria-labelledby=\"section-2\">\n <h2 id=\"section-2\">Vertical nav example section 2 with secondary variant styling</h2>\n </PageSection>\n <PageSection aria-labelledby=\"section-3\">\n <h2 id=\"section-3\">Vertical nav example section 3</h2>\n </PageSection>\n </Page>\n );\n};\n","title":"Vertical navigation","lang":"ts","className":""}}>
|
|
772
|
-
|
|
773
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
774
|
-
{`To add a vertical sidebar to a `}
|
|
775
|
-
|
|
776
|
-
<code {...{"className":"ws-code "}}>
|
|
777
|
-
{`<Page>`}
|
|
778
|
-
</code>
|
|
779
|
-
{`, pass a `}
|
|
780
|
-
|
|
781
|
-
<code {...{"className":"ws-code "}}>
|
|
782
|
-
{`<PageSidebar>`}
|
|
783
|
-
</code>
|
|
784
|
-
{` component into the `}
|
|
785
|
-
|
|
786
|
-
<code {...{"className":"ws-code "}}>
|
|
787
|
-
{`sidebar`}
|
|
788
|
-
</code>
|
|
789
|
-
{` property. To render navigation in the sidebar, pass a `}
|
|
790
|
-
|
|
791
|
-
<code {...{"className":"ws-code "}}>
|
|
792
|
-
{`<PageSidebarBody>`}
|
|
793
|
-
</code>
|
|
794
|
-
{` component to `}
|
|
795
|
-
|
|
796
|
-
<code {...{"className":"ws-code "}}>
|
|
797
|
-
{`<PageSidebar>`}
|
|
798
|
-
</code>
|
|
799
|
-
{`.`}
|
|
800
|
-
</p>
|
|
801
|
-
|
|
802
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
803
|
-
{`The `}
|
|
804
|
-
|
|
805
|
-
<code {...{"className":"ws-code "}}>
|
|
806
|
-
{`isSidebarOpen`}
|
|
807
|
-
</code>
|
|
808
|
-
{` property helps facilitate the opening and closing of the sidebar and should be 'true' when the sidebar is visible.`}
|
|
809
|
-
</p>
|
|
810
|
-
</Example>,
|
|
811
|
-
'Multiple sidebar body': props =>
|
|
812
|
-
<Example {...pageData} {...props} {...{"code":"import { useState } from 'react';\nimport {\n Page,\n Masthead,\n MastheadMain,\n MastheadToggle,\n MastheadBrand,\n MastheadLogo,\n MastheadContent,\n PageSidebar,\n PageSidebarBody,\n PageSection,\n PageToggleButton,\n Toolbar,\n ToolbarContent,\n ToolbarItem\n} from '@patternfly/react-core';\n\nexport const PageMultipleSidebarBody: React.FunctionComponent = () => {\n const [isSidebarOpen, setIsSidebarOpen] = useState(true);\n\n const onSidebarToggle = () => {\n setIsSidebarOpen(!isSidebarOpen);\n };\n\n const headerToolbar = (\n <Toolbar id=\"multiple-sidebar-body-toolbar\">\n <ToolbarContent>\n <ToolbarItem>header-tools</ToolbarItem>\n </ToolbarContent>\n </Toolbar>\n );\n\n const masthead = (\n <Masthead>\n <MastheadMain>\n <MastheadToggle>\n <PageToggleButton\n aria-label=\"Global navigation\"\n isSidebarOpen={isSidebarOpen}\n onSidebarToggle={onSidebarToggle}\n id=\"multiple-sidebar-body-nav-toggle\"\n isHamburgerButton\n />\n </MastheadToggle>\n <MastheadBrand>\n <MastheadLogo href=\"https://patternfly.org\" target=\"_blank\">\n Logo\n </MastheadLogo>\n </MastheadBrand>\n </MastheadMain>\n <MastheadContent>{headerToolbar}</MastheadContent>\n </Masthead>\n );\n\n const sidebar = (\n <PageSidebar isSidebarOpen={isSidebarOpen} id=\"multiple-sidebar-body-sidebar\">\n <PageSidebarBody isContextSelector>\n First sidebar body (for a context selector/perspective switcher)\n </PageSidebarBody>\n <PageSidebarBody usePageInsets>Second sidebar body (with insets)</PageSidebarBody>\n <PageSidebarBody isFilled={true}>Third sidebar body (with fill)</PageSidebarBody>\n <PageSidebarBody isFilled={false} usePageInsets>\n Fourth sidebar body (with insets and no fill)\n </PageSidebarBody>\n </PageSidebar>\n );\n\n return (\n <Page masthead={masthead} sidebar={sidebar}>\n <PageSection aria-labelledby=\"section-1\">\n <h2 id=\"section-1\">Multiple sidebar body example section 1</h2>\n </PageSection>\n <PageSection aria-labelledby=\"section-2\">\n <h2 id=\"section-2\">Multiple sidebar body example section 2</h2>\n </PageSection>\n <PageSection aria-labelledby=\"section-3\">\n <h2 id=\"section-3\">Multiple sidebar body example section 3</h2>\n </PageSection>\n </Page>\n );\n};\n","title":"Multiple sidebar body","lang":"ts","className":""}}>
|
|
813
|
-
|
|
814
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
815
|
-
{`You can have multiple `}
|
|
816
|
-
|
|
817
|
-
<code {...{"className":"ws-code "}}>
|
|
818
|
-
{`<PageSidebarBody>`}
|
|
819
|
-
</code>
|
|
820
|
-
{` components inside the `}
|
|
821
|
-
|
|
822
|
-
<code {...{"className":"ws-code "}}>
|
|
823
|
-
{`<PageSidebar>`}
|
|
824
|
-
</code>
|
|
825
|
-
{` for more customization. You can modify the `}
|
|
826
|
-
|
|
827
|
-
<code {...{"className":"ws-code "}}>
|
|
828
|
-
{`<PageSidebarBody>`}
|
|
829
|
-
</code>
|
|
830
|
-
{` further by passing the following properties:`}
|
|
831
|
-
</p>
|
|
832
|
-
|
|
833
|
-
<ul {...{"className":"pf-v6-c-content--ul pf-m-editorial ws-ul "}}>
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
<li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
|
|
838
|
-
|
|
839
|
-
<code {...{"className":"ws-code "}}>
|
|
840
|
-
{`usePageInsets`}
|
|
841
|
-
</code>
|
|
842
|
-
{` will modify the component's insets to match page insets`}
|
|
843
|
-
</li>
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
<li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
|
|
848
|
-
|
|
849
|
-
<code {...{"className":"ws-code "}}>
|
|
850
|
-
{`isFilled={true}`}
|
|
851
|
-
</code>
|
|
852
|
-
{` will cause the component to grow to fill the available vertical space`}
|
|
853
|
-
</li>
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
<li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
|
|
858
|
-
|
|
859
|
-
<code {...{"className":"ws-code "}}>
|
|
860
|
-
{`isFilled={false}`}
|
|
861
|
-
</code>
|
|
862
|
-
{` will cause the component to `}
|
|
863
|
-
|
|
864
|
-
<strong {...{"className":""}}>
|
|
865
|
-
{`not`}
|
|
866
|
-
</strong>
|
|
867
|
-
{` grow to fill the available vertical space`}
|
|
868
|
-
</li>
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
</ul>
|
|
872
|
-
|
|
873
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
874
|
-
{`By default, the last `}
|
|
875
|
-
|
|
876
|
-
<code {...{"className":"ws-code "}}>
|
|
877
|
-
{`<PageSidebarBody>`}
|
|
878
|
-
</code>
|
|
879
|
-
{` will grow to fill the available vertical space. This can be changed by passing `}
|
|
880
|
-
|
|
881
|
-
<code {...{"className":"ws-code "}}>
|
|
882
|
-
{`isFilled={false}`}
|
|
883
|
-
</code>
|
|
884
|
-
{` as demonstrated in the following example.`}
|
|
885
|
-
</p>
|
|
886
|
-
</Example>,
|
|
887
|
-
'Horizontal navigation': props =>
|
|
888
|
-
<Example {...pageData} {...props} {...{"code":"import {\n Page,\n Masthead,\n MastheadMain,\n MastheadBrand,\n MastheadLogo,\n MastheadContent,\n PageSection,\n Toolbar,\n ToolbarContent,\n ToolbarItem\n} from '@patternfly/react-core';\n\nexport const PageHorizontalNav: React.FunctionComponent = () => {\n const headerToolbar = (\n <Toolbar id=\"horizontal-toolbar\">\n <ToolbarContent>\n <ToolbarItem>Navigation</ToolbarItem>\n <ToolbarItem>header-tools</ToolbarItem>\n </ToolbarContent>\n </Toolbar>\n );\n\n const masthead = (\n <Masthead inset={{ default: 'insetXs' }}>\n <MastheadMain>\n <MastheadBrand>\n <MastheadLogo href=\"https://patternfly.org\" target=\"_blank\">\n Logo\n </MastheadLogo>\n </MastheadBrand>\n </MastheadMain>\n <MastheadContent>{headerToolbar}</MastheadContent>\n </Masthead>\n );\n\n return (\n <Page masthead={masthead}>\n <PageSection aria-labelledby=\"section-1\">\n <h2 id=\"section-1\">Horizontal nav example section 1</h2>\n </PageSection>\n <PageSection variant=\"secondary\" aria-labelledby=\"section-2\">\n <h2 id=\"section-2\">Horizontal nav example section 2 with secondary variant styling</h2>\n </PageSection>\n <PageSection aria-labelledby=\"section-3\">\n <h2 id=\"section-3\">Horizontal nav example section 3</h2>\n </PageSection>\n </Page>\n );\n};\n","title":"Horizontal navigation","lang":"ts","className":""}}>
|
|
889
|
-
|
|
890
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
891
|
-
{`To add horizontal navigation to the top of a `}
|
|
892
|
-
|
|
893
|
-
<code {...{"className":"ws-code "}}>
|
|
894
|
-
{`<Page>`}
|
|
895
|
-
</code>
|
|
896
|
-
{`, add the navigation inside of a `}
|
|
897
|
-
|
|
898
|
-
<code {...{"className":"ws-code "}}>
|
|
899
|
-
{`<ToolbarItem>`}
|
|
900
|
-
</code>
|
|
901
|
-
{` in the `}
|
|
902
|
-
|
|
903
|
-
<code {...{"className":"ws-code "}}>
|
|
904
|
-
{`<Toolbar>`}
|
|
905
|
-
</code>
|
|
906
|
-
{` that is passed to the `}
|
|
907
|
-
|
|
908
|
-
<code {...{"className":"ws-code "}}>
|
|
909
|
-
{`<MastheadContent>`}
|
|
910
|
-
</code>
|
|
911
|
-
{` of the `}
|
|
912
|
-
|
|
913
|
-
<code {...{"className":"ws-code "}}>
|
|
914
|
-
{`<Masthead>`}
|
|
915
|
-
</code>
|
|
916
|
-
{`.`}
|
|
917
|
-
</p>
|
|
918
|
-
</Example>,
|
|
919
|
-
'Uncontrolled navigation': props =>
|
|
920
|
-
<Example {...pageData} {...props} {...{"code":"import {\n Page,\n Masthead,\n MastheadMain,\n MastheadToggle,\n MastheadBrand,\n MastheadLogo,\n MastheadContent,\n PageSidebar,\n PageSidebarBody,\n PageSection,\n PageToggleButton,\n Toolbar,\n ToolbarContent,\n ToolbarItem\n} from '@patternfly/react-core';\n\nexport const PageUncontrolledNav: React.FunctionComponent = () => {\n const headerToolbar = (\n <Toolbar id=\"uncontrolled-toolbar\">\n <ToolbarContent>\n <ToolbarItem>header-tools</ToolbarItem>\n </ToolbarContent>\n </Toolbar>\n );\n\n const masthead = (\n <Masthead>\n <MastheadMain>\n <MastheadToggle>\n <PageToggleButton isHamburgerButton aria-label=\"Global navigation\" id=\"uncontrolled-nav-toggle\" />\n </MastheadToggle>\n <MastheadBrand>\n <MastheadLogo href=\"https://patternfly.org\" target=\"_blank\">\n Logo\n </MastheadLogo>\n </MastheadBrand>\n </MastheadMain>\n <MastheadContent>{headerToolbar}</MastheadContent>\n </Masthead>\n );\n\n const sidebar = (\n <PageSidebar id=\"uncontrolled-sidebar\">\n <PageSidebarBody>Navigation</PageSidebarBody>\n </PageSidebar>\n );\n\n return (\n <Page isManagedSidebar masthead={masthead} sidebar={sidebar}>\n <PageSection aria-labelledby=\"section-1\">\n <h2 id=\"section-1\">Uncontrolled nav example section 1</h2>\n </PageSection>\n <PageSection aria-labelledby=\"section-2\">\n <h2 id=\"section-2\">Uncontrolled nav example section 2</h2>\n </PageSection>\n <PageSection aria-labelledby=\"section-3\">\n <h2 id=\"section-3\">Uncontrolled nav example section 3</h2>\n </PageSection>\n </Page>\n );\n};\n","title":"Uncontrolled navigation","lang":"ts","className":""}}>
|
|
921
|
-
|
|
922
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
923
|
-
{`When the `}
|
|
924
|
-
|
|
925
|
-
<code {...{"className":"ws-code "}}>
|
|
926
|
-
{`isManagedSidebar`}
|
|
927
|
-
</code>
|
|
928
|
-
{` property is true, it manages the sidebar open/close state, removing the need to pass both `}
|
|
929
|
-
|
|
930
|
-
<code {...{"className":"ws-code "}}>
|
|
931
|
-
{`isSidebarOpen`}
|
|
932
|
-
</code>
|
|
933
|
-
{` into the `}
|
|
934
|
-
|
|
935
|
-
<code {...{"className":"ws-code "}}>
|
|
936
|
-
{`<PageSidebar>`}
|
|
937
|
-
</code>
|
|
938
|
-
{` and `}
|
|
939
|
-
|
|
940
|
-
<code {...{"className":"ws-code "}}>
|
|
941
|
-
{`onSidebarToggle`}
|
|
942
|
-
</code>
|
|
943
|
-
{` into the `}
|
|
944
|
-
|
|
945
|
-
<code {...{"className":"ws-code "}}>
|
|
946
|
-
{`<PageToggleButton>`}
|
|
947
|
-
</code>
|
|
948
|
-
{`.`}
|
|
949
|
-
</p>
|
|
950
|
-
</Example>,
|
|
951
|
-
'Filled page sections': props =>
|
|
952
|
-
<Example {...pageData} {...props} {...{"code":"import { useState } from 'react';\nimport {\n Page,\n Masthead,\n MastheadMain,\n MastheadToggle,\n MastheadBrand,\n MastheadLogo,\n MastheadContent,\n PageSidebar,\n PageSidebarBody,\n PageSection,\n PageToggleButton,\n Toolbar,\n ToolbarContent,\n ToolbarItem\n} from '@patternfly/react-core';\n\nexport const PageWithOrWithoutFill: React.FunctionComponent = () => {\n const [isSidebarOpen, setIsSidebarOpen] = useState(true);\n\n const onSidebarToggle = () => {\n setIsSidebarOpen(!isSidebarOpen);\n };\n\n const headerToolbar = (\n <Toolbar id=\"fill-toolbar\">\n <ToolbarContent>\n <ToolbarItem>header-tools</ToolbarItem>\n </ToolbarContent>\n </Toolbar>\n );\n\n const masthead = (\n <Masthead>\n <MastheadMain>\n <MastheadToggle>\n <PageToggleButton\n isHamburgerButton\n aria-label=\"Global navigation\"\n isSidebarOpen={isSidebarOpen}\n onSidebarToggle={onSidebarToggle}\n id=\"fill-nav-toggle\"\n />\n </MastheadToggle>\n <MastheadBrand>\n <MastheadLogo href=\"https://patternfly.org\" target=\"_blank\">\n Logo\n </MastheadLogo>\n </MastheadBrand>\n </MastheadMain>\n <MastheadContent>{headerToolbar}</MastheadContent>\n </Masthead>\n );\n\n const sidebar = (\n <PageSidebar isSidebarOpen={isSidebarOpen} id=\"fill-sidebar\">\n <PageSidebarBody>Navigation</PageSidebarBody>\n </PageSidebar>\n );\n\n return (\n <Page isContentFilled masthead={masthead} sidebar={sidebar}>\n <PageSection aria-labelledby=\"section-1\">\n <h2 id=\"section-1\">Section without fill</h2>\n </PageSection>\n <PageSection isFilled={true} variant=\"secondary\" aria-labelledby=\"section-2\">\n <h2 id=\"section-2\">Section with fill</h2>\n </PageSection>\n <PageSection aria-labelledby=\"section-3\">\n <h2 id=\"section-3\">Another section without fill</h2>\n </PageSection>\n </Page>\n );\n};\n","title":"Filled page sections","lang":"ts","className":""}}>
|
|
953
|
-
|
|
954
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
955
|
-
{`By default, page sections will not expand to fill in the available vertical space in a page.`}
|
|
956
|
-
</p>
|
|
957
|
-
|
|
958
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
959
|
-
{`To change this default behavior, pass `}
|
|
960
|
-
|
|
961
|
-
<code {...{"className":"ws-code "}}>
|
|
962
|
-
{`isContentFilled`}
|
|
963
|
-
</code>
|
|
964
|
-
{` to the `}
|
|
965
|
-
|
|
966
|
-
<code {...{"className":"ws-code "}}>
|
|
967
|
-
{`<Page>`}
|
|
968
|
-
</code>
|
|
969
|
-
{` component and `}
|
|
970
|
-
|
|
971
|
-
<code {...{"className":"ws-code "}}>
|
|
972
|
-
{`isFilled={true}`}
|
|
973
|
-
</code>
|
|
974
|
-
{` to any child `}
|
|
975
|
-
|
|
976
|
-
<code {...{"className":"ws-code "}}>
|
|
977
|
-
{`<PageSection>`}
|
|
978
|
-
</code>
|
|
979
|
-
{` or `}
|
|
980
|
-
|
|
981
|
-
<code {...{"className":"ws-code "}}>
|
|
982
|
-
{`<PageGroup>`}
|
|
983
|
-
</code>
|
|
984
|
-
{` component that you want to fill the space. If multiple components are set to fill, then the available space will be split equally between them.`}
|
|
985
|
-
</p>
|
|
986
|
-
</Example>,
|
|
987
|
-
'Main section padding': props =>
|
|
988
|
-
<Example {...pageData} {...props} {...{"code":"import { useState } from 'react';\nimport {\n Page,\n Masthead,\n MastheadMain,\n MastheadToggle,\n MastheadBrand,\n MastheadLogo,\n MastheadContent,\n PageSidebar,\n PageSidebarBody,\n PageSection,\n PageToggleButton,\n Toolbar,\n ToolbarContent,\n ToolbarItem\n} from '@patternfly/react-core';\n\nexport const PageMainSectionPadding: React.FunctionComponent = () => {\n const [isSidebarOpen, setIsSidebarOpen] = useState(true);\n\n const onSidebarToggle = () => {\n setIsSidebarOpen(!isSidebarOpen);\n };\n\n const headerToolbar = (\n <Toolbar id=\"main-padding-toolbar\">\n <ToolbarContent>\n <ToolbarItem>header-tools</ToolbarItem>\n </ToolbarContent>\n </Toolbar>\n );\n\n const masthead = (\n <Masthead>\n <MastheadMain>\n <MastheadToggle>\n <PageToggleButton\n aria-label=\"Global navigation\"\n isSidebarOpen={isSidebarOpen}\n onSidebarToggle={onSidebarToggle}\n id=\"main-padding-nav-toggle\"\n isHamburgerButton\n />\n </MastheadToggle>\n <MastheadBrand>\n <MastheadLogo href=\"https://patternfly.org\" target=\"_blank\">\n Logo\n </MastheadLogo>\n </MastheadBrand>\n </MastheadMain>\n <MastheadContent>{headerToolbar}</MastheadContent>\n </Masthead>\n );\n\n const sidebar = (\n <PageSidebar isSidebarOpen={isSidebarOpen} id=\"main-padding-sidebar\">\n <PageSidebarBody>Navigation</PageSidebarBody>\n </PageSidebar>\n );\n\n return (\n <Page masthead={masthead} sidebar={sidebar}>\n <PageSection aria-labelledby=\"section-1\">\n <h2 id=\"section-1\">Section with default padding</h2>\n </PageSection>\n <PageSection padding={{ default: 'noPadding' }} aria-labelledby=\"section-2\">\n <h2 id=\"section-2\">Section with no padding</h2>\n </PageSection>\n <PageSection padding={{ default: 'noPadding', md: 'padding' }} aria-labelledby=\"section-3\">\n <h2 id=\"section-3\">Section with padding on medium</h2>\n </PageSection>\n <PageSection padding={{ md: 'noPadding' }} aria-labelledby=\"section-4\">\n <h2 id=\"section-4\">Section with no padding on medium</h2>\n </PageSection>\n </Page>\n );\n};\n","title":"Main section padding","lang":"ts","className":""}}>
|
|
989
|
-
|
|
990
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
991
|
-
{`To adjust the padding of a `}
|
|
992
|
-
|
|
993
|
-
<code {...{"className":"ws-code "}}>
|
|
994
|
-
{`<PageSection>`}
|
|
995
|
-
</code>
|
|
996
|
-
{`, you can pass in different values to the `}
|
|
997
|
-
|
|
998
|
-
<code {...{"className":"ws-code "}}>
|
|
999
|
-
{`padding`}
|
|
1000
|
-
</code>
|
|
1001
|
-
{` property. These values should be aligned to a specific breakpoint: 'default', 'sm', 'md', 'lg', 'xl', and '2xl'. Each breakpoint passed into the property should be given a value of either ‘padding’ or ‘noPadding’.`}
|
|
1002
|
-
</p>
|
|
1003
|
-
|
|
1004
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
1005
|
-
{`As the page's viewport width increases, breakpoints inherit the padding behavior of the previous breakpoint. For example, padding that is set on 'lg' also applies to 'xl' and '2xl'.`}
|
|
1006
|
-
</p>
|
|
1007
|
-
|
|
1008
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
1009
|
-
{`To remove padding entirely, pass 'noPadding' to the `}
|
|
1010
|
-
|
|
1011
|
-
<code {...{"className":"ws-code "}}>
|
|
1012
|
-
{`default`}
|
|
1013
|
-
</code>
|
|
1014
|
-
{` breakpoint. For example, the second section in this example passes in `}
|
|
1015
|
-
|
|
1016
|
-
<code {...{"className":"ws-code "}}>
|
|
1017
|
-
{`padding={{ default: 'noPadding' }}`}
|
|
1018
|
-
</code>
|
|
1019
|
-
{`. Since no specific breakpoints are mentioned, every breakpoint will have 'noPadding'.`}
|
|
1020
|
-
</p>
|
|
1021
|
-
|
|
1022
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
1023
|
-
{`To add padding at specific breakpoints, pass in "padding" at those breakpoints. For example, the third section in this example passes in `}
|
|
1024
|
-
|
|
1025
|
-
<code {...{"className":"ws-code "}}>
|
|
1026
|
-
{`padding={{ default: 'noPadding', md: 'padding' }}`}
|
|
1027
|
-
</code>
|
|
1028
|
-
{`. At 'md', 'lg', 'xl', and '2xl' breakpoints, the default value will be overwritten, and padding will be added.`}
|
|
1029
|
-
</p>
|
|
1030
|
-
|
|
1031
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
1032
|
-
{`To remove padding at specific breakpoints, pass in 'noPadding' at those breakpoints. For example, the fourth section in this example passes in `}
|
|
1033
|
-
|
|
1034
|
-
<code {...{"className":"ws-code "}}>
|
|
1035
|
-
{`padding={{ md: 'noPadding' }}`}
|
|
1036
|
-
</code>
|
|
1037
|
-
{`, which means that 'md', 'lg' 'xl', and '2xl' breakpoints will have `}
|
|
1038
|
-
|
|
1039
|
-
<code {...{"className":"ws-code "}}>
|
|
1040
|
-
{`noPadding`}
|
|
1041
|
-
</code>
|
|
1042
|
-
{`.`}
|
|
1043
|
-
</p>
|
|
1044
|
-
</Example>,
|
|
1045
|
-
'Main section variations': props =>
|
|
1046
|
-
<Example {...pageData} {...props} {...{"code":"import { useState } from 'react';\nimport {\n Page,\n Masthead,\n MastheadMain,\n MastheadToggle,\n MastheadBrand,\n MastheadLogo,\n MastheadContent,\n PageSidebar,\n PageSidebarBody,\n PageSection,\n PageToggleButton,\n Toolbar,\n ToolbarContent,\n ToolbarItem\n} from '@patternfly/react-core';\n\nexport const PageMainSectionPadding: React.FunctionComponent = () => {\n const [isSidebarOpen, setIsSidebarOpen] = useState(true);\n\n const onSidebarToggle = () => {\n setIsSidebarOpen(!isSidebarOpen);\n };\n\n const headerToolbar = (\n <Toolbar id=\"main-variations-toolbar\">\n <ToolbarContent>\n <ToolbarItem>header-tools</ToolbarItem>\n </ToolbarContent>\n </Toolbar>\n );\n\n const header = (\n <Masthead>\n <MastheadMain>\n <MastheadToggle>\n <PageToggleButton\n aria-label=\"Global navigation\"\n isSidebarOpen={isSidebarOpen}\n onSidebarToggle={onSidebarToggle}\n id=\"main-variations-nav-toggle\"\n isHamburgerButton\n />\n </MastheadToggle>\n <MastheadBrand>\n <MastheadLogo href=\"https://patternfly.org\" target=\"_blank\">\n Logo\n </MastheadLogo>\n </MastheadBrand>\n </MastheadMain>\n <MastheadContent>{headerToolbar}</MastheadContent>\n </Masthead>\n );\n\n const sidebar = (\n <PageSidebar isSidebarOpen={isSidebarOpen} id=\"main-variations-sidebar\">\n <PageSidebarBody>Navigation</PageSidebarBody>\n </PageSidebar>\n );\n\n return (\n <Page header={header} sidebar={sidebar}>\n <PageSection type=\"subnav\" aria-label=\"With subnav type\">\n Section with <code>type=\"subnav\"</code> for horizontal subnav navigation\n </PageSection>\n <PageSection type=\"nav\" aria-label=\"With nav type\">\n Section with <code>type=\"nav\"</code> for tertiary navigation\n </PageSection>\n <PageSection type=\"tabs\" aria-label=\"With tabs type\">\n Section with <code>type=\"tabs\"</code> for tabs\n </PageSection>\n <PageSection type=\"breadcrumb\" aria-label=\"With breadcrumb type\">\n Section with <code>type=\"breadcrumb\"</code> for breadcrumbs\n </PageSection>\n <PageSection aria-label=\"With default type\">\n Section without <code>type</code> prop or <code>type=\"default\"</code> for main sections\n </PageSection>\n <PageSection type=\"wizard\" aria-label=\"With wizard type\">\n Section with <code>type=\"wizard\"</code> for wizards\n </PageSection>\n </Page>\n );\n};\n","title":"Main section variations","lang":"ts","className":""}}>
|
|
1047
|
-
|
|
1048
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
1049
|
-
{`This example shows all types of page sections.`}
|
|
1050
|
-
</p>
|
|
1051
|
-
</Example>,
|
|
1052
|
-
'Group section': props =>
|
|
1053
|
-
<Example {...pageData} {...props} {...{"code":"import { useState } from 'react';\nimport {\n Page,\n Masthead,\n MastheadMain,\n MastheadToggle,\n MastheadBrand,\n MastheadLogo,\n MastheadContent,\n PageSidebar,\n PageSidebarBody,\n PageSection,\n PageGroup,\n PageBreadcrumb,\n PageToggleButton,\n Breadcrumb,\n BreadcrumbItem,\n Nav,\n NavList,\n NavItem,\n Toolbar,\n ToolbarContent,\n ToolbarItem\n} from '@patternfly/react-core';\n\nexport const PageGroupSection: React.FunctionComponent = () => {\n const [isSidebarOpen, setIsSidebarOpen] = useState(true);\n\n const onSidebarToggle = () => {\n setIsSidebarOpen(!isSidebarOpen);\n };\n\n const headerToolbar = (\n <Toolbar id=\"group-section-toolbar\">\n <ToolbarContent>\n <ToolbarItem>header-tools</ToolbarItem>\n </ToolbarContent>\n </Toolbar>\n );\n\n const masthead = (\n <Masthead>\n <MastheadMain>\n <MastheadToggle>\n <PageToggleButton\n aria-label=\"Global navigation\"\n isSidebarOpen={isSidebarOpen}\n onSidebarToggle={onSidebarToggle}\n id=\"group-section-nav-toggle\"\n isHamburgerButton\n />\n </MastheadToggle>\n <MastheadBrand>\n <MastheadLogo href=\"https://patternfly.org\" target=\"_blank\">\n Logo\n </MastheadLogo>\n </MastheadBrand>\n </MastheadMain>\n <MastheadContent>{headerToolbar}</MastheadContent>\n </Masthead>\n );\n\n const sidebar = (\n <PageSidebar isSidebarOpen={isSidebarOpen} id=\"group-section-sidebar\">\n <PageSidebarBody>Navigation</PageSidebarBody>\n </PageSidebar>\n );\n\n return (\n <Page masthead={masthead} sidebar={sidebar}>\n <PageGroup>\n <Nav aria-label=\"Group section navigation\" variant=\"horizontal-subnav\">\n <NavList>\n <NavItem href=\"#\" itemId={0} isActive>\n System panel\n </NavItem>\n <NavItem href=\"#\" itemId={1}>\n Policy\n </NavItem>\n <NavItem href=\"#\" itemId={2}>\n Authentication\n </NavItem>\n <NavItem href=\"#\" itemId={3}>\n Network services\n </NavItem>\n <NavItem href=\"#\" itemId={4}>\n Server\n </NavItem>\n </NavList>\n </Nav>\n <PageBreadcrumb>\n <Breadcrumb>\n <BreadcrumbItem>Section home</BreadcrumbItem>\n <BreadcrumbItem to=\"#\">Section title</BreadcrumbItem>\n <BreadcrumbItem to=\"#\">Section title</BreadcrumbItem>\n <BreadcrumbItem to=\"#\" isActive>\n Section landing\n </BreadcrumbItem>\n </Breadcrumb>\n </PageBreadcrumb>\n <PageSection aria-labelledby=\"grouped-section\">\n <h2 id=\"grouped-section\">Grouped section</h2>\n </PageSection>\n </PageGroup>\n <PageSection aria-labelledby=\"section-1\">\n <h2 id=\"section-1\">Grouped example section 1</h2>\n </PageSection>\n <PageSection aria-labelledby=\"section-2\">\n <h2 id=\"section-2\">Grouped example section 2</h2>\n </PageSection>\n </Page>\n );\n};\n","title":"Group section","lang":"ts","className":""}}>
|
|
1054
|
-
|
|
1055
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
1056
|
-
{`To group page content sections, add 1 or more `}
|
|
1057
|
-
|
|
1058
|
-
<code {...{"className":"ws-code "}}>
|
|
1059
|
-
{`<PageGroup>`}
|
|
1060
|
-
</code>
|
|
1061
|
-
{` components to a `}
|
|
1062
|
-
|
|
1063
|
-
<code {...{"className":"ws-code "}}>
|
|
1064
|
-
{`<Page>`}
|
|
1065
|
-
</code>
|
|
1066
|
-
{`.`}
|
|
1067
|
-
</p>
|
|
1068
|
-
|
|
1069
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
1070
|
-
{`The following example adds a group containing `}
|
|
1071
|
-
|
|
1072
|
-
<code {...{"className":"ws-code "}}>
|
|
1073
|
-
{`<PageBreadcrumb>`}
|
|
1074
|
-
</code>
|
|
1075
|
-
{` and `}
|
|
1076
|
-
|
|
1077
|
-
<code {...{"className":"ws-code "}}>
|
|
1078
|
-
{`<PageSection>`}
|
|
1079
|
-
</code>
|
|
1080
|
-
{` components.`}
|
|
1081
|
-
</p>
|
|
1082
|
-
|
|
1083
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
1084
|
-
{`To add additional components and information to a group, you may use the following properties:`}
|
|
1085
|
-
</p>
|
|
1086
|
-
|
|
1087
|
-
<ul {...{"className":"pf-v6-c-content--ul pf-m-editorial ws-ul "}}>
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
<li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
|
|
1092
|
-
{`To indicate that a breadcrumb should be in a group, use `}
|
|
1093
|
-
|
|
1094
|
-
<code {...{"className":"ws-code "}}>
|
|
1095
|
-
{`isBreadcrumbGrouped`}
|
|
1096
|
-
</code>
|
|
1097
|
-
{`.`}
|
|
1098
|
-
</li>
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
<li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
|
|
1103
|
-
{`To indicate that horizontal sub navigation should be in a group, use `}
|
|
1104
|
-
|
|
1105
|
-
<code {...{"className":"ws-code "}}>
|
|
1106
|
-
{`isHorizontalSubnavGrouped`}
|
|
1107
|
-
</code>
|
|
1108
|
-
{`.`}
|
|
1109
|
-
</li>
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
<li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
|
|
1114
|
-
{`To specify additional group content, use `}
|
|
1115
|
-
|
|
1116
|
-
<code {...{"className":"ws-code "}}>
|
|
1117
|
-
{`additionalGroupedContent`}
|
|
1118
|
-
</code>
|
|
1119
|
-
{`.`}
|
|
1120
|
-
</li>
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
</ul>
|
|
1124
|
-
</Example>,
|
|
1125
|
-
'Centered section': props =>
|
|
1126
|
-
<Example {...pageData} {...props} {...{"code":"import { useState } from 'react';\nimport {\n Page,\n Masthead,\n MastheadMain,\n MastheadToggle,\n MastheadBrand,\n MastheadLogo,\n MastheadContent,\n PageSidebar,\n PageSidebarBody,\n PageSection,\n PageToggleButton,\n Toolbar,\n ToolbarContent,\n ToolbarItem,\n Card,\n CardBody\n} from '@patternfly/react-core';\nimport pageSectionWidthLimitMaxWidth from '@patternfly/react-tokens/dist/esm/c_page_section_m_limit_width_MaxWidth';\n\nexport const PageCenteredSection: React.FunctionComponent = () => {\n const [isSidebarOpen, setIsSidebarOpen] = useState(true);\n\n const onSidebarToggle = () => {\n setIsSidebarOpen(!isSidebarOpen);\n };\n\n const headerToolbar = (\n <Toolbar id=\"centered-toolbar\">\n <ToolbarContent>\n <ToolbarItem>header-tools</ToolbarItem>\n </ToolbarContent>\n </Toolbar>\n );\n\n const masthead = (\n <Masthead>\n <MastheadMain>\n <MastheadToggle>\n <PageToggleButton\n aria-label=\"Global navigation\"\n isSidebarOpen={isSidebarOpen}\n onSidebarToggle={onSidebarToggle}\n id=\"centered-nav-toggle\"\n isHamburgerButton\n />\n </MastheadToggle>\n <MastheadBrand>\n <MastheadLogo href=\"https://patternfly.org\" target=\"_blank\">\n Logo\n </MastheadLogo>\n </MastheadBrand>\n </MastheadMain>\n <MastheadContent>{headerToolbar}</MastheadContent>\n </Masthead>\n );\n\n const sidebar = (\n <PageSidebar isSidebarOpen={isSidebarOpen} id=\"centered-section-sidebar\">\n <PageSidebarBody>Navigation</PageSidebarBody>\n </PageSidebar>\n );\n\n return (\n <Page masthead={masthead} sidebar={sidebar}>\n <PageSection isWidthLimited isCenterAligned aria-label=\"width limited page section\">\n <Card>\n <CardBody>\n When a width limited page section is wider than the value of\n <code>{pageSectionWidthLimitMaxWidth.name}</code>, the section will be centered in the main section.\n <br />\n <br />\n The content in this example is placed in a card to better illustrate how the section behaves when it is\n centered. A card is not required to center a page section.\n </CardBody>\n </Card>\n </PageSection>\n </Page>\n );\n};\n","title":"Centered section","lang":"ts","className":""}}>
|
|
1127
|
-
|
|
1128
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
1129
|
-
{`By default, a page section spans the width of the page. To reduce the width of a section, use the `}
|
|
1130
|
-
|
|
1131
|
-
<code {...{"className":"ws-code "}}>
|
|
1132
|
-
{`isWidthLimited`}
|
|
1133
|
-
</code>
|
|
1134
|
-
{` property. To center align width-limited page sections, use the `}
|
|
1135
|
-
|
|
1136
|
-
<code {...{"className":"ws-code "}}>
|
|
1137
|
-
{`isCenterAligned`}
|
|
1138
|
-
</code>
|
|
1139
|
-
{` property. When the main content area of a page is wider than the value of a centered, width-limited page section's `}
|
|
1140
|
-
|
|
1141
|
-
<code {...{"className":"ws-code "}}>
|
|
1142
|
-
{`--pf-v6-c-page--section--m-limit-width--MaxWidth`}
|
|
1143
|
-
</code>
|
|
1144
|
-
{` custom property, the section will automatically be centered.`}
|
|
1145
|
-
</p>
|
|
1146
|
-
|
|
1147
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
1148
|
-
{`The content in this example is placed in a card to better illustrate how the section behaves when it is centered, but a card is not required to center a page section.`}
|
|
1149
|
-
</p>
|
|
1150
|
-
</Example>,
|
|
1151
|
-
'Plain sections and groups': props =>
|
|
1152
|
-
<Example {...pageData} {...props} {...{"code":"import { useState } from 'react';\nimport {\n Page,\n Masthead,\n MastheadMain,\n MastheadToggle,\n MastheadBrand,\n MastheadLogo,\n MastheadContent,\n PageSidebar,\n PageSidebarBody,\n PageSection,\n PageGroup,\n PageToggleButton,\n Toolbar,\n ToolbarContent,\n ToolbarItem\n} from '@patternfly/react-core';\n\nexport const PagePlainSections: React.FunctionComponent = () => {\n const [isSidebarOpen, setIsSidebarOpen] = useState(true);\n\n const onSidebarToggle = () => {\n setIsSidebarOpen(!isSidebarOpen);\n };\n\n const headerToolbar = (\n <Toolbar id=\"plain-sections-toolbar\">\n <ToolbarContent>\n <ToolbarItem>header-tools</ToolbarItem>\n </ToolbarContent>\n </Toolbar>\n );\n\n const masthead = (\n <Masthead>\n <MastheadMain>\n <MastheadToggle>\n <PageToggleButton\n aria-label=\"Plain sections example navigation\"\n isSidebarOpen={isSidebarOpen}\n onSidebarToggle={onSidebarToggle}\n id=\"plain-sections-nav-toggle\"\n isHamburgerButton\n />\n </MastheadToggle>\n <MastheadBrand>\n <MastheadLogo href=\"https://patternfly.org\" target=\"_blank\">\n Logo\n </MastheadLogo>\n </MastheadBrand>\n </MastheadMain>\n <MastheadContent>{headerToolbar}</MastheadContent>\n </Masthead>\n );\n\n const sidebar = (\n <PageSidebar isSidebarOpen={isSidebarOpen} id=\"plain-sections-sidebar\">\n <PageSidebarBody>Navigation</PageSidebarBody>\n </PageSidebar>\n );\n\n return (\n <Page masthead={masthead} sidebar={sidebar}>\n <PageSection isPlain aria-label=\"Plain section example\">\n <h2>Plain PageSection</h2>\n <p>\n This section uses <code>isPlain</code> to apply plain styling with no background color.\n </p>\n </PageSection>\n <PageSection aria-label=\"Default section example\">\n <h2>Default PageSection</h2>\n <p>This section has the default styling with a background color.</p>\n </PageSection>\n <PageGroup isPlain>\n <PageSection aria-label=\"Section in plain group\">\n <h2>PageSection inside Plain PageGroup</h2>\n <p>\n This section is inside a PageGroup with <code>isPlain</code> applied.\n </p>\n </PageSection>\n <PageSection aria-label=\"Another section in plain group\">\n <h2>Another Section in Plain Group</h2>\n <p>Both sections are grouped with plain styling.</p>\n </PageSection>\n </PageGroup>\n <PageSection variant=\"secondary\" aria-label=\"Secondary variant section\">\n <h2>Secondary Variant Section</h2>\n <p>This section uses the secondary variant for contrast.</p>\n </PageSection>\n </Page>\n );\n};\n","title":"Plain sections and groups","lang":"ts","className":""}}>
|
|
1153
|
-
|
|
1154
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
1155
|
-
{`To remove the default background color from a page section or group, use the `}
|
|
1156
|
-
|
|
1157
|
-
<code {...{"className":"ws-code "}}>
|
|
1158
|
-
{`isPlain`}
|
|
1159
|
-
</code>
|
|
1160
|
-
{` property on `}
|
|
1161
|
-
|
|
1162
|
-
<code {...{"className":"ws-code "}}>
|
|
1163
|
-
{`<PageSection>`}
|
|
1164
|
-
</code>
|
|
1165
|
-
{` or `}
|
|
1166
|
-
|
|
1167
|
-
<code {...{"className":"ws-code "}}>
|
|
1168
|
-
{`<PageGroup>`}
|
|
1169
|
-
</code>
|
|
1170
|
-
{` components.`}
|
|
1171
|
-
</p>
|
|
1172
|
-
</Example>,
|
|
1173
|
-
'Dynamic sticky section': props =>
|
|
1174
|
-
<Example {...pageData} {...props} {...{"code":"import { useLayoutEffect, useState, useRef } from 'react';\nimport {\n Page,\n Masthead,\n MastheadMain,\n MastheadBrand,\n MastheadLogo,\n MastheadContent,\n PageSection,\n Toolbar,\n ToolbarContent,\n ToolbarItem,\n Breadcrumb,\n BreadcrumbItem,\n Content\n} from '@patternfly/react-core';\n\nconst useIsStuckFromScrollParent = ({\n shouldTrack,\n scrollParentRef\n}: {\n shouldTrack: boolean;\n scrollParentRef: React.RefObject<any>;\n}): boolean => {\n const [isStuck, setIsStuck] = useState(false);\n\n useLayoutEffect(() => {\n if (!shouldTrack) {\n setIsStuck(false);\n return;\n }\n\n const scrollElement = scrollParentRef.current;\n if (!scrollElement) {\n setIsStuck(false);\n return;\n }\n\n const syncFromScroll = () => {\n setIsStuck(scrollElement.scrollTop > 0);\n };\n syncFromScroll();\n scrollElement.addEventListener('scroll', syncFromScroll, { passive: true });\n return () => scrollElement.removeEventListener('scroll', syncFromScroll);\n }, [shouldTrack, scrollParentRef]);\n\n return isStuck;\n};\n\nexport const PageDynamicStickySection: React.FunctionComponent = () => {\n const scrollParentRef = useRef<HTMLDivElement>(null);\n const isStickyStuck = useIsStuckFromScrollParent({ shouldTrack: true, scrollParentRef });\n\n const headerToolbar = (\n <Toolbar id=\"dynamic-sticky-toolbar\">\n <ToolbarContent>\n <ToolbarItem>header-tools</ToolbarItem>\n </ToolbarContent>\n </Toolbar>\n );\n\n const masthead = (\n <Masthead>\n <MastheadMain>\n <MastheadBrand>\n <MastheadLogo href=\"https://patternfly.org\" target=\"_blank\">\n Logo\n </MastheadLogo>\n </MastheadBrand>\n </MastheadMain>\n <MastheadContent>{headerToolbar}</MastheadContent>\n </Masthead>\n );\n\n return (\n <Page masthead={masthead}>\n <div ref={scrollParentRef} style={{ overflowY: 'auto', height: '100%' }}>\n <PageSection type=\"breadcrumb\" stickyBase=\"top\" isStickyStuck={isStickyStuck}>\n <Breadcrumb>\n <BreadcrumbItem>Section home</BreadcrumbItem>\n <BreadcrumbItem to=\"#\">Section title</BreadcrumbItem>\n <BreadcrumbItem to=\"#\" isActive>\n Section landing\n </BreadcrumbItem>\n </Breadcrumb>\n </PageSection>\n <PageSection>\n <Content>\n <h1>Main title</h1>\n <p>\n Scroll the container to see the breadcrumb section above dynamically apply its stuck styling. The section\n uses <code>stickyBase="top"</code> to remain fixed at the top of the scroll parent, and{' '}\n <code>isStickyStuck</code> is toggled via a scroll event listener to apply visual styling when the section\n is no longer at the top edge.\n </p>\n </Content>\n </PageSection>\n {Array.from({ length: 30 }, (_, i) => (\n <PageSection key={i} variant={i % 2 === 0 ? 'default' : 'secondary'}>\n <Content>\n <p>{`Section ${i + 1} content`}</p>\n </Content>\n </PageSection>\n ))}\n </div>\n </Page>\n );\n};\n","title":"Dynamic sticky section","lang":"ts","className":""}}>
|
|
1175
|
-
|
|
1176
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
1177
|
-
{`A page section may be made sticky with separate control of its sticky positioning and stuck styling using the `}
|
|
1178
|
-
|
|
1179
|
-
<code {...{"className":"ws-code "}}>
|
|
1180
|
-
{`stickyBase`}
|
|
1181
|
-
</code>
|
|
1182
|
-
{` and `}
|
|
1183
|
-
|
|
1184
|
-
<code {...{"className":"ws-code "}}>
|
|
1185
|
-
{`isStickyStuck`}
|
|
1186
|
-
</code>
|
|
1187
|
-
{` properties. The `}
|
|
1188
|
-
|
|
1189
|
-
<code {...{"className":"ws-code "}}>
|
|
1190
|
-
{`stickyBase`}
|
|
1191
|
-
</code>
|
|
1192
|
-
{` property accepts a value of `}
|
|
1193
|
-
|
|
1194
|
-
<code {...{"className":"ws-code "}}>
|
|
1195
|
-
{`"top"`}
|
|
1196
|
-
</code>
|
|
1197
|
-
{` or `}
|
|
1198
|
-
|
|
1199
|
-
<code {...{"className":"ws-code "}}>
|
|
1200
|
-
{`"bottom"`}
|
|
1201
|
-
</code>
|
|
1202
|
-
{` and applies the base sticky positioning in the given direction. The `}
|
|
1203
|
-
|
|
1204
|
-
<code {...{"className":"ws-code "}}>
|
|
1205
|
-
{`isStickyStuck`}
|
|
1206
|
-
</code>
|
|
1207
|
-
{` property applies visual "stuck" styling such as a background, box shadow, and border, and should be toggled based on the scroll position of the scroll parent container.`}
|
|
1208
|
-
</p>
|
|
1209
|
-
|
|
1210
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
1211
|
-
{`In this example, a scroll event listener on the scroll parent container toggles `}
|
|
1212
|
-
|
|
1213
|
-
<code {...{"className":"ws-code "}}>
|
|
1214
|
-
{`isStickyStuck`}
|
|
1215
|
-
</code>
|
|
1216
|
-
{` when `}
|
|
1217
|
-
|
|
1218
|
-
<code {...{"className":"ws-code "}}>
|
|
1219
|
-
{`scrollTop > 0`}
|
|
1220
|
-
</code>
|
|
1221
|
-
{`, so the stuck styling appears only when the content is scrolled.`}
|
|
1222
|
-
</p>
|
|
1223
|
-
</Example>
|
|
1224
|
-
};
|
|
1225
|
-
|
|
1226
|
-
const Component = () => (
|
|
1227
|
-
<React.Fragment>
|
|
1228
|
-
<AutoLinkHeader {...{"id":"examples","headingLevel":"h2","className":"ws-title ws-h2"}}>
|
|
1229
|
-
{`Examples`}
|
|
1230
|
-
</AutoLinkHeader>
|
|
1231
|
-
<AutoLinkHeader {...{"id":"basic-page-components","headingLevel":"h3","className":"ws-title ws-h3"}}>
|
|
1232
|
-
{`Basic page components`}
|
|
1233
|
-
</AutoLinkHeader>
|
|
1234
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
1235
|
-
{`A page will typically contain the following components:`}
|
|
1236
|
-
</p>
|
|
1237
|
-
<ul {...{"className":"pf-v6-c-content--ul pf-m-editorial ws-ul "}}>
|
|
1238
|
-
<li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
|
|
1239
|
-
{`A `}
|
|
1240
|
-
<code {...{"className":"ws-code "}}>
|
|
1241
|
-
{`<Page>`}
|
|
1242
|
-
</code>
|
|
1243
|
-
{` with a `}
|
|
1244
|
-
<code {...{"className":"ws-code "}}>
|
|
1245
|
-
{`masthead`}
|
|
1246
|
-
</code>
|
|
1247
|
-
{` prop that often contains a `}
|
|
1248
|
-
<PatternflyThemeLink {...{"to":"/components/masthead","className":""}}>
|
|
1249
|
-
{`masthead`}
|
|
1250
|
-
</PatternflyThemeLink>
|
|
1251
|
-
{` component`}
|
|
1252
|
-
</li>
|
|
1253
|
-
</ul>
|
|
1254
|
-
<p {...{"className":"pf-v6-c-content--p pf-m-editorial ws-p "}}>
|
|
1255
|
-
{`The `}
|
|
1256
|
-
<code {...{"className":"ws-code "}}>
|
|
1257
|
-
{`<MastheadMain>`}
|
|
1258
|
-
</code>
|
|
1259
|
-
{` component includes the smaller area that typically contains the `}
|
|
1260
|
-
<code {...{"className":"ws-code "}}>
|
|
1261
|
-
{`<MastheadToggle>`}
|
|
1262
|
-
</code>
|
|
1263
|
-
{` and a `}
|
|
1264
|
-
<code {...{"className":"ws-code "}}>
|
|
1265
|
-
{`<MastheadLogo>`}
|
|
1266
|
-
</code>
|
|
1267
|
-
{`. `}
|
|
1268
|
-
<code {...{"className":"ws-code "}}>
|
|
1269
|
-
{`<MastheadContent>`}
|
|
1270
|
-
</code>
|
|
1271
|
-
{` represents the main portion of the masthead, and will typically contain a `}
|
|
1272
|
-
<code {...{"className":"ws-code "}}>
|
|
1273
|
-
{`<Toolbar>`}
|
|
1274
|
-
</code>
|
|
1275
|
-
{` or other menu-like components, like a `}
|
|
1276
|
-
<code {...{"className":"ws-code "}}>
|
|
1277
|
-
{`<Dropdown>`}
|
|
1278
|
-
</code>
|
|
1279
|
-
{`.`}
|
|
1280
|
-
</p>
|
|
1281
|
-
<ul {...{"className":"pf-v6-c-content--ul pf-m-editorial ws-ul "}}>
|
|
1282
|
-
<li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
|
|
1283
|
-
{`Mastheads contain a `}
|
|
1284
|
-
<code {...{"className":"ws-code "}}>
|
|
1285
|
-
{`<MastheadMain>`}
|
|
1286
|
-
</code>
|
|
1287
|
-
{` component, which includes the `}
|
|
1288
|
-
<code {...{"className":"ws-code "}}>
|
|
1289
|
-
{`<MastheadToggle>`}
|
|
1290
|
-
</code>
|
|
1291
|
-
{`, a `}
|
|
1292
|
-
<code {...{"className":"ws-code "}}>
|
|
1293
|
-
{`<MastheadLogo>`}
|
|
1294
|
-
</code>
|
|
1295
|
-
{`, and the page's toolbar (via `}
|
|
1296
|
-
<code {...{"className":"ws-code "}}>
|
|
1297
|
-
{`<MastheadContent>`}
|
|
1298
|
-
</code>
|
|
1299
|
-
{`.) The `}
|
|
1300
|
-
<code {...{"className":"ws-code "}}>
|
|
1301
|
-
{`<MastheadToggle>`}
|
|
1302
|
-
</code>
|
|
1303
|
-
{` component contains a `}
|
|
1304
|
-
<code {...{"className":"ws-code "}}>
|
|
1305
|
-
{`<PageToggleButton>`}
|
|
1306
|
-
</code>
|
|
1307
|
-
{`, and the `}
|
|
1308
|
-
<code {...{"className":"ws-code "}}>
|
|
1309
|
-
{`<MastheadLogo>`}
|
|
1310
|
-
</code>
|
|
1311
|
-
{` component contains a `}
|
|
1312
|
-
<code {...{"className":"ws-code "}}>
|
|
1313
|
-
{`<MastheadBrand>`}
|
|
1314
|
-
</code>
|
|
1315
|
-
{`.`}
|
|
1316
|
-
</li>
|
|
1317
|
-
<li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
|
|
1318
|
-
{`1 or more `}
|
|
1319
|
-
<code {...{"className":"ws-code "}}>
|
|
1320
|
-
{`<PageSidebarBody>`}
|
|
1321
|
-
</code>
|
|
1322
|
-
{` components inside `}
|
|
1323
|
-
<code {...{"className":"ws-code "}}>
|
|
1324
|
-
{`<PageSidebar>`}
|
|
1325
|
-
</code>
|
|
1326
|
-
{` for vertical navigation or other sidebar content`}
|
|
1327
|
-
</li>
|
|
1328
|
-
<li {...{"className":"pf-v6-c-content--li pf-m-editorial ws-li "}}>
|
|
1329
|
-
{`1 or more `}
|
|
1330
|
-
<code {...{"className":"ws-code "}}>
|
|
1331
|
-
{`<PageSection>`}
|
|
1332
|
-
</code>
|
|
1333
|
-
{` components`}
|
|
1334
|
-
</li>
|
|
1335
|
-
</ul>
|
|
1336
|
-
{React.createElement(pageData.examples["Vertical navigation"])}
|
|
1337
|
-
{React.createElement(pageData.examples["Multiple sidebar body"])}
|
|
1338
|
-
{React.createElement(pageData.examples["Horizontal navigation"])}
|
|
1339
|
-
{React.createElement(pageData.examples["Uncontrolled navigation"])}
|
|
1340
|
-
{React.createElement(pageData.examples["Filled page sections"])}
|
|
1341
|
-
{React.createElement(pageData.examples["Main section padding"])}
|
|
1342
|
-
{React.createElement(pageData.examples["Main section variations"])}
|
|
1343
|
-
{React.createElement(pageData.examples["Group section"])}
|
|
1344
|
-
{React.createElement(pageData.examples["Centered section"])}
|
|
1345
|
-
{React.createElement(pageData.examples["Plain sections and groups"])}
|
|
1346
|
-
{React.createElement(pageData.examples["Dynamic sticky section"])}
|
|
1347
|
-
</React.Fragment>
|
|
1348
|
-
);
|
|
1349
|
-
Component.displayName = 'ComponentsPageReactDocs';
|
|
1350
|
-
Component.pageData = pageData;
|
|
1351
|
-
|
|
1352
|
-
export default Component;
|