Skip to content

Commit 49f80a2

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
improvement(ui): use chips for table filter actions
1 parent ea31ca7 commit 49f80a2

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-filter

‎apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-filter/table-filter.tsx‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22

33
import { memo, useCallback, useMemo, useRef, useState } from 'react'
4-
import { Button, ChipDropdown, ChipInput, cn } from '@sim/emcn'
4+
import { Button, Chip, ChipDropdown, ChipInput, cn } from '@sim/emcn'
55
import { Plus, X } from '@sim/emcn/icons'
66
import { generateShortId } from '@sim/utils/id'
77
import type { ColumnDefinition, FilterRule, TablePredicate } from '@/lib/table'
@@ -243,20 +243,19 @@ export function TableFilter({
243243
))}
244244

245245
<div className={cn('mt-1 flex items-center', !autoApply && 'justify-between')}>
246-
<Button variant='ghost' size='sm' onClick={handleAdd} className='px-2 text-xs'>
247-
<Plus className='mr-1 size-[10px]' />
246+
<Chip type='button' onClick={handleAdd} leftIcon={Plus}>
248247
Add filter
249-
</Button>
248+
</Chip>
250249
{!autoApply && (
251250
<div className='flex items-center gap-1.5'>
252251
{filter !== null && (
253-
<Button variant='ghost' size='sm' onClick={handleClear} className='px-2 text-xs'>
252+
<Chip type='button' onClick={handleClear}>
254253
Clear filters
255-
</Button>
254+
</Chip>
256255
)}
257-
<Button variant='default' size='sm' onClick={handleApply} className='text-xs'>
256+
<Chip type='button' variant='border-shadow' onClick={handleApply}>
258257
Apply filter
259-
</Button>
258+
</Chip>
260259
</div>
261260
)}
262261
</div>

0 commit comments

Comments
 (0)