From 018e01ca7c485e1b72d1fa0d4f051c47977956e8 Mon Sep 17 00:00:00 2001 From: Titani Date: Wed, 2 Dec 2026 14:29:24 -0500 Subject: [PATCH 1/2] fix(Page): Added PageContextProps to documentation --- packages/react-core/src/components/Page/PageContext.tsx | 8 ++++++++ packages/react-core/src/components/Page/examples/Page.md | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/react-core/src/components/Page/PageContext.tsx b/packages/react-core/src/components/Page/PageContext.tsx index ad2dcf5658c..79a293e2d6c 100644 --- a/packages/react-core/src/components/Page/PageContext.tsx +++ b/packages/react-core/src/components/Page/PageContext.tsx @@ -3,13 +3,21 @@ import { createContext } from 'react'; import { getBreakpoint, getVerticalBreakpoint } from '../../helpers/util'; export interface PageContextProps { + /** Flag indicating if the Page component is managing the sidebar open/close state */ isManagedSidebar: boolean; + /** Callback to toggle the managed sidebar open/close state */ onSidebarToggle: () => void; + /** Flag indicating if the sidebar is currently open */ isSidebarOpen: boolean; + /** Flag indicating if the page is being viewed at a mobile viewport */ isMobile: boolean; + /** Width of the page, used to determine the applied horizontal breakpoint modifier */ width: number; + /** Height of the page, used to determine the applied vertical breakpoint modifier */ height: number; + /** Function used to determine the horizontal breakpoint to apply based on the page width */ getBreakpoint: (width: number | null) => 'default' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; + /** Function used to determine the vertical breakpoint to apply based on the page height */ getVerticalBreakpoint: (height: number | null) => 'default' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; } diff --git a/packages/react-core/src/components/Page/examples/Page.md b/packages/react-core/src/components/Page/examples/Page.md index 7c697d7f5dc..f097ac9a31e 100644 --- a/packages/react-core/src/components/Page/examples/Page.md +++ b/packages/react-core/src/components/Page/examples/Page.md @@ -11,7 +11,8 @@ propComponents: 'PageSection', 'PageGroup', 'PageBreadcrumb', - 'PageToggleButton' + 'PageToggleButton', + 'PageContextProps' ] --- From ddf80cbc66145054ff458dc4fc41bdfa27a67a90 Mon Sep 17 00:00:00 2001 From: Titani Date: Wed, 2 Dec 2026 14:40:39 -0500 Subject: [PATCH 2/2] Update prop descriptions --- packages/react-core/src/components/Page/PageContext.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-core/src/components/Page/PageContext.tsx b/packages/react-core/src/components/Page/PageContext.tsx index 79a293e2d6c..d97ca3f2794 100644 --- a/packages/react-core/src/components/Page/PageContext.tsx +++ b/packages/react-core/src/components/Page/PageContext.tsx @@ -11,9 +11,9 @@ export interface PageContextProps { isSidebarOpen: boolean; /** Flag indicating if the page is being viewed at a mobile viewport */ isMobile: boolean; - /** Width of the page, used to determine the applied horizontal breakpoint modifier */ + /** Width of the page, used to determine the applied horizontal breakpoint modifier. Defaults to null until the page resize observer has measured the page. */ width: number; - /** Height of the page, used to determine the applied vertical breakpoint modifier */ + /** Height of the page, used to determine the applied vertical breakpoint modifier. Defaults to null until the page resize observer has measured the page. */ height: number; /** Function used to determine the horizontal breakpoint to apply based on the page width */ getBreakpoint: (width: number | null) => 'default' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';