@hyphen/hyphen-components 5.7.3 → 5.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyphen/hyphen-components",
3
- "version": "5.7.3",
3
+ "version": "5.7.4",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "@hyphen"
@@ -576,14 +576,12 @@ const OrgSwitcher = ({
576
576
  >
577
577
  AC
578
578
  </Box>
579
- {!isCollapsed && (
580
- <span
581
- className="font-weight-semibold"
582
- style={{ whiteSpace: 'nowrap' }}
583
- >
584
- {activeTeam.name}
585
- </span>
586
- )}
579
+ <span
580
+ className="font-weight-semibold"
581
+ style={{ whiteSpace: 'nowrap' }}
582
+ >
583
+ {activeTeam.name}
584
+ </span>
587
585
  </Box>
588
586
  {!isCollapsed && (
589
587
  <Icon
@@ -326,12 +326,17 @@ const SidebarHeader = React.forwardRef<
326
326
  HTMLDivElement,
327
327
  React.ComponentProps<'div'>
328
328
  >(({ className, ...props }, ref) => {
329
+ const { state } = useSidebar();
330
+
331
+ const isCollapsed = state === 'collapsed';
332
+
329
333
  return (
330
334
  <div
331
335
  ref={ref}
332
336
  data-sidebar="header"
333
337
  className={classNames(
334
338
  'display-flex g-sm p-v-md p-h-md p-right-0-desktop',
339
+ { 'overflow-hidden': isCollapsed },
335
340
  className
336
341
  )}
337
342
  {...props}