Skip to content

Commit b559a71

Browse files
committed
fix: refine views menu composition
1 parent 9b939f4 commit b559a71

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/views-menu

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/views-menu/views-menu.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {
1515
PopoverAnchor,
1616
PopoverContent,
1717
PopoverItem,
18-
PopoverSection,
1918
Tooltip,
2019
} from '@sim/emcn'
2120
import { Check, Pencil, Pin, Plus, Trash } from '@sim/emcn/icons'
@@ -132,8 +131,8 @@ export const ViewsMenu = memo(function ViewsMenu({
132131
side='bottom'
133132
align='start'
134133
sideOffset={6}
135-
minWidth={240}
136-
maxWidth={320}
134+
minWidth={220}
135+
maxWidth={280}
137136
maxHeight={420}
138137
border
139138
className={cn(
@@ -144,10 +143,7 @@ export const ViewsMenu = memo(function ViewsMenu({
144143
onMouseLeave={scheduleClose}
145144
onFocusCapture={cancelScheduledClose}
146145
>
147-
<PopoverSection className='flex h-[28px] items-center px-2 py-0 text-[var(--text-muted)] text-caption'>
148-
Views
149-
</PopoverSection>
150-
<div className='flex flex-col'>
146+
<div className='flex flex-col gap-0.5'>
151147
{!hasDefaultView && (
152148
<ViewRow
153149
label={ALL_ROWS_VIEW_LABEL}
@@ -342,7 +338,7 @@ function ViewRow({ label, isActive, onSelect, defaultState, actions }: ViewRowPr
342338
defaultState.onSetDefault?.()
343339
}}
344340
>
345-
<Pin className={cn('size-[14px]', defaultState.isDefault && 'fill-current')} />
341+
<Pin className={cn(defaultState.isDefault ? 'size-3 fill-current' : 'size-[14px]')} />
346342
</Button>
347343
)}
348344
</div>

0 commit comments

Comments
 (0)