From 1e1e849e255e2f390b43d65908162e3926cf367a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Jaeger=20Foresti?= <60678893+juliajforesti@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:11:58 -0300 Subject: [PATCH] fix: `ContextualbarHeader` expanded prop (#33109) Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com> --- .changeset/rich-pillows-hang.md | 5 +++++ .../client/components/Contextualbar/ContextualbarHeader.tsx | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/rich-pillows-hang.md diff --git a/.changeset/rich-pillows-hang.md b/.changeset/rich-pillows-hang.md new file mode 100644 index 00000000000..b714a5e6acd --- /dev/null +++ b/.changeset/rich-pillows-hang.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': patch +--- + +Fixes the `expanded` prop being accidentally forwarded to `ContextualbarHeader` diff --git a/apps/meteor/client/components/Contextualbar/ContextualbarHeader.tsx b/apps/meteor/client/components/Contextualbar/ContextualbarHeader.tsx index 795182df846..ebd92f0095e 100644 --- a/apps/meteor/client/components/Contextualbar/ContextualbarHeader.tsx +++ b/apps/meteor/client/components/Contextualbar/ContextualbarHeader.tsx @@ -8,10 +8,10 @@ type ContextualbarHeaderProps = { children: ReactNode; } & ComponentPropsWithoutRef<typeof ContextualbarHeaderComponent>; -const ContextualbarHeader = (props: ContextualbarHeaderProps) => ( +const ContextualbarHeader = ({ expanded, ...props }: ContextualbarHeaderProps) => ( <FeaturePreview feature='newNavigation'> <FeaturePreviewOff> - <ContextualbarHeaderComponent height={props.expanded ? '64px' : '56px'} {...props} /> + <ContextualbarHeaderComponent height={expanded ? '64px' : '56px'} {...props} /> </FeaturePreviewOff> <FeaturePreviewOn> <ContextualbarV2Header mbs={-1} {...props} /> -- GitLab