Skip to content

Commit 57f5f6e

Browse files
committed
improvement(sidebar): match workspace switcher popover width to sidebar
Use Radix UI's built-in --radix-popover-trigger-width CSS variable instead of hardcoded 160px so the popover matches the trigger width and responds to sidebar resizing.
1 parent f26a375 commit 57f5f6e

File tree

1 file changed

+5
-1
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header

1 file changed

+5
-1
lines changed

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/workspace-header.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,11 @@ export function WorkspaceHeader({
343343
align='start'
344344
side='bottom'
345345
sideOffset={8}
346-
style={{ maxWidth: '160px', minWidth: '160px' }}
346+
style={{
347+
width: 'var(--radix-popover-trigger-width)',
348+
minWidth: 'var(--radix-popover-trigger-width)',
349+
maxWidth: 'var(--radix-popover-trigger-width)',
350+
}}
347351
onOpenAutoFocus={(e) => e.preventDefault()}
348352
>
349353
{isWorkspacesLoading ? (

0 commit comments

Comments
 (0)