From 8fbbe26ea1813626d03194fab9d98794e0b05cdd Mon Sep 17 00:00:00 2001 From: Jessie Date: Mon, 15 Apr 2024 15:45:21 -0400 Subject: [PATCH] Add drawerWidth prop --- packages/react-core/src/components/Page/Page.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/react-core/src/components/Page/Page.tsx b/packages/react-core/src/components/Page/Page.tsx index dc1bead60ee..3ba3fdb1ba3 100644 --- a/packages/react-core/src/components/Page/Page.tsx +++ b/packages/react-core/src/components/Page/Page.tsx @@ -27,6 +27,8 @@ export interface PageProps extends React.HTMLProps { notificationDrawer?: React.ReactNode; /** Flag indicating Notification drawer in expanded */ isNotificationDrawerExpanded?: boolean; + /** Sets drawer width, in either pixels or percentage. */ + drawerWidth?: string; /** Flag indicating if breadcrumb width should be limited */ isBreadcrumbWidthLimited?: boolean; /** Callback when notification drawer panel is finished expanding. */ @@ -219,6 +221,7 @@ class Page extends React.Component { notificationDrawer, isNotificationDrawerExpanded, onNotificationDrawerExpand, + drawerWidth, isTertiaryNavWidthLimited, skipToContent, role, @@ -302,6 +305,7 @@ class Page extends React.Component { className={css(styles.pageMain)} tabIndex={mainTabIndex} aria-label={mainAriaLabel} + style={{ width: `${drawerWidth}` }} > {group} {!isTertiaryNavGrouped && nav} @@ -310,7 +314,7 @@ class Page extends React.Component { ); - const panelContent = {notificationDrawer}; + const panelContent = {notificationDrawer}; return (