Skip to content

Commit 89d87da

Browse files
committed
feat(Page): rename 'header' prop to 'masthead'
1 parent a104a4b commit 89d87da

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

packages/react-core/src/components/Page/Page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export interface PageProps extends React.HTMLProps<HTMLDivElement> {
1919
children?: React.ReactNode;
2020
/** Additional classes added to the page layout */
2121
className?: string;
22-
/** Header component (e.g. <Masthead />) */
23-
header?: React.ReactNode;
22+
/** Masthead component (e.g. <Masthead />) */
23+
masthead?: React.ReactNode;
2424
/** Sidebar component for a side nav (e.g. <PageSidebar />) */
2525
sidebar?: React.ReactNode;
2626
/** Notification drawer component for an optional notification drawer (e.g. <NotificationDrawer />) */
@@ -214,7 +214,7 @@ class Page extends React.Component<PageProps, PageState> {
214214
isBreadcrumbWidthLimited,
215215
className,
216216
children,
217-
header,
217+
masthead,
218218
sidebar,
219219
notificationDrawer,
220220
isNotificationDrawerExpanded,
@@ -328,7 +328,7 @@ class Page extends React.Component<PageProps, PageState> {
328328
)}
329329
>
330330
{skipToContent}
331-
{header}
331+
{masthead}
332332
{sidebar}
333333
{notificationDrawer && (
334334
<div className={css(styles.pageDrawer)}>

packages/react-core/src/components/Page/PageSidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface PageSidebarProps extends React.HTMLProps<HTMLDivElement> {
1010
children?: React.ReactNode;
1111
/**
1212
* If true, manages the sidebar open/close state and there is no need to pass the isSidebarOpen boolean into
13-
* the sidebar component or add a callback onSidebarToggle function into the PageHeader component
13+
* the sidebar component or add a callback onSidebarToggle function into the Masthead component
1414
*/
1515
isManagedSidebar?: boolean;
1616
/** Programmatically manage if the sidebar is shown, if isManagedSidebar is set to true in the Page component, this prop is managed */

packages/react-core/src/components/Page/examples/Page.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import c_page_section_m_limit_width_MaxWidth from '@patternfly/react-tokens/dist
2424

2525
A page will typically contain the following components:
2626

27-
- A `<Page>` with a `header` that often contains a [masthead](/components/masthead)
27+
- A `<Page>` with a `masthead` prop that often contains a [masthead](/components/masthead) component
2828
- Mastheads contain the `<PageToggleButton>`, a `<MastheadMain>` that contains a `<MastheadBrand>`, and the page's header toolbar within `<MastheadContent>`.
2929
- 1 or more `<PageSidebarBody>` components inside `<PageSidebar>` for vertical navigation or other sidebar content
3030
- 1 or more `<PageSection>` components

packages/react-core/src/demos/DashboardWrapper.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const DashboardWrapper: React.FC<DashboardWrapperProps> = ({
4949
children,
5050
mainContainerId,
5151
breadcrumb,
52-
header,
52+
masthead,
5353
sidebar,
5454
sidebarNavOpen,
5555
onPageResize,
@@ -106,7 +106,7 @@ export const DashboardWrapper: React.FC<DashboardWrapperProps> = ({
106106

107107
return (
108108
<Page
109-
header={header ?? <DashboardHeader />}
109+
masthead={masthead ?? <DashboardHeader />}
110110
sidebar={sidebar ?? _sidebar}
111111
isManagedSidebar
112112
skipToContent={PageSkipToContent}

packages/react-core/src/demos/examples/AlertGroup/AlertGroupToastWithNotificationDrawer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ export const AlertGroupToastWithNotificationDrawer: React.FunctionComponent = ()
310310

311311
return (
312312
<DashboardWrapper
313-
header={<DashboardHeader notificationBadge={notificationBadge} />}
313+
masthead={<DashboardHeader notificationBadge={notificationBadge} />}
314314
mainContainerId="main-content-page-layout-default-nav"
315315
notificationDrawer={notificationDrawer}
316316
isNotificationDrawerExpanded={isDrawerExpanded}

packages/react-table/src/demos/DashboardWrapper.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ interface DashboardWrapperProps {
2626
children?: React.ReactNode;
2727
/** Additional classes added to the page layout */
2828
className?: string;
29-
/** Header component (e.g. <Masthead />) */
30-
header?: React.ReactNode;
29+
/** Masthead component (e.g. <Masthead />) */
30+
masthead?: React.ReactNode;
3131
/** Sidebar component for a side nav (e.g. <PageSidebar />) */
3232
sidebar?: React.ReactNode;
3333
/** Notification drawer component for an optional notification drawer (e.g. <NotificationDrawer />) */
@@ -120,7 +120,7 @@ export const DashboardWrapper: React.FC<DashboardWrapperProps> = ({
120120
children,
121121
mainContainerId,
122122
breadcrumb,
123-
header,
123+
masthead,
124124
sidebar,
125125
sidebarNavOpen,
126126
onPageResize,
@@ -177,7 +177,7 @@ export const DashboardWrapper: React.FC<DashboardWrapperProps> = ({
177177

178178
return (
179179
<Page
180-
header={header ?? <DashboardHeader />}
180+
masthead={masthead ?? <DashboardHeader />}
181181
sidebar={sidebar ?? _sidebar}
182182
isManagedSidebar
183183
skipToContent={PageSkipToContent}

0 commit comments

Comments
 (0)