From de77a9d932e4d64cb494a7ae78f25a7236a67a3d Mon Sep 17 00:00:00 2001 From: manojleaton Date: Wed, 4 Sep 2024 15:22:48 +0530 Subject: [PATCH 1/3] bug fix --- components/src/core/ToolbarMenu/ToolbarMenu.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/src/core/ToolbarMenu/ToolbarMenu.tsx b/components/src/core/ToolbarMenu/ToolbarMenu.tsx index f986349a5..731a74505 100644 --- a/components/src/core/ToolbarMenu/ToolbarMenu.tsx +++ b/components/src/core/ToolbarMenu/ToolbarMenu.tsx @@ -32,13 +32,16 @@ const useUtilityClasses = (ownerState: ToolbarMenuProps): Record & { itemID?: string }; + +export type ToolbarMenuItem = ToolbarMenuCompItem; + export type ToolbarMenuCompGroup = { /** The color used for the text */ fontColor?: string; /** The color used for icons */ iconColor?: string; /** List of navigation items to render */ - items: ToolbarMenuCompItem[]; + items: ToolbarMenuItem[]; /** Text to display in the group header */ title?: string; }; From ed40ecf03c689371ebdc8e780f80d9dc84be41e7 Mon Sep 17 00:00:00 2001 From: manojleaton Date: Thu, 5 Sep 2024 13:48:14 +0530 Subject: [PATCH 2/3] removed ToolbarMenuCompItem --- components/src/core/ToolbarMenu/ToolbarMenu.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/src/core/ToolbarMenu/ToolbarMenu.tsx b/components/src/core/ToolbarMenu/ToolbarMenu.tsx index 731a74505..e3b4b0a70 100644 --- a/components/src/core/ToolbarMenu/ToolbarMenu.tsx +++ b/components/src/core/ToolbarMenu/ToolbarMenu.tsx @@ -31,9 +31,7 @@ const useUtilityClasses = (ownerState: ToolbarMenuProps): Record & { itemID?: string }; - -export type ToolbarMenuItem = ToolbarMenuCompItem; +export type ToolbarMenuItem = Omit & { itemID?: string }; export type ToolbarMenuCompGroup = { /** The color used for the text */ @@ -194,7 +192,7 @@ const ToolbarMenuRenderer: React.ForwardRefRenderFunction + (item: ToolbarMenuItem, itemIndex: number): NavItem => Object.assign({ itemID: itemIndex.toString() }, item) )} /> From d9a1ae8b9711c08e8df759fee283795959dda6b9 Mon Sep 17 00:00:00 2001 From: manojleaton Date: Thu, 5 Sep 2024 13:49:00 +0530 Subject: [PATCH 3/3] ran prettier --- .../Drawer/playground/PlaygroundPage.tsx | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/src/componentDocs/Drawer/playground/PlaygroundPage.tsx b/docs/src/componentDocs/Drawer/playground/PlaygroundPage.tsx index 0254a074b..e2ce79e71 100644 --- a/docs/src/componentDocs/Drawer/playground/PlaygroundPage.tsx +++ b/docs/src/componentDocs/Drawer/playground/PlaygroundPage.tsx @@ -198,7 +198,6 @@ const DrawerPreview: PreviewComponent = ({ data }) => { }} ref={containerRef} > - { width: persistent ? 'inherit' : 'initial', }, '& .BluiDrawer-content': { backgroundColor: 'background.paper' }, - }} {...removeEmptyProps(rest)} > @@ -254,7 +252,8 @@ const DrawerPreview: PreviewComponent = ({ data }) => { } sx={{ '& .BluiDrawerLayout-drawer': { height: 330 }, - }}> + }} + > { <> - {variant === 'temporary' && updateData('open', !open)} - > - - } + {variant === 'temporary' && ( + updateData('open', !open)} + > + + + )} Toolbar @@ -296,7 +297,6 @@ const DrawerPreview: PreviewComponent = ({ data }) => { - ); };