Skip to content

Commit a9dc8d1

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
improvement(ui): use chips for ordinary product actions
1 parent 39573f3 commit a9dc8d1

6 files changed

Lines changed: 26 additions & 43 deletions

File tree

‎apps/sim/app/workspace/[workspaceId]/files/files.tsx‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
44
import {
5-
Button,
5+
Chip,
66
ChipCombobox,
77
ChipConfirmModal,
88
Columns2,
@@ -2057,13 +2057,9 @@ function FilesContent() {
20572057
</div>
20582058
)}
20592059
{hasActiveFilters && (
2060-
<Button
2061-
variant='ghost'
2062-
onClick={clearFileFilters}
2063-
className='h-[32px] w-full text-caption hover-hover:bg-[var(--surface-active)]'
2064-
>
2060+
<Chip fullWidth onClick={clearFileFilters}>
20652061
Clear all filters
2066-
</Button>
2062+
</Chip>
20672063
)}
20682064
</div>
20692065
)

‎apps/sim/app/workspace/[workspaceId]/logs/logs.tsx‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
import {
1515
Button,
1616
Calendar,
17+
Chip,
1718
ChipCombobox,
1819
type ComboboxOption,
1920
cn,
@@ -1584,13 +1585,9 @@ function LogsFilterPanel({ searchQuery, onSearchQueryChange }: LogsFilterPanelPr
15841585
</div>
15851586

15861587
{filtersActive && (
1587-
<Button
1588-
variant='active'
1589-
onClick={handleClearFilters}
1590-
className='h-[32px] w-full rounded-md'
1591-
>
1588+
<Chip variant='border-shadow' fullWidth onClick={handleClearFilters}>
15921589
Clear All Filters
1593-
</Button>
1590+
</Chip>
15941591
)}
15951592
</div>
15961593
)

‎apps/sim/app/workspace/[workspaceId]/settings/components/admin/admin.tsx‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,8 @@ export function Admin() {
443443
Page {currentPage} of {totalPages} ({usersData.total} users)
444444
</span>
445445
<div className='flex gap-1'>
446-
<Button
447-
variant='active'
448-
className='h-[28px] text-caption'
446+
<Chip
447+
variant='border-shadow'
449448
onClick={() =>
450449
setAdminParams((prev) => ({
451450
offset: Math.max(0, prev.offset - PAGE_SIZE),
@@ -454,17 +453,16 @@ export function Admin() {
454453
disabled={usersOffset === 0 || usersLoading}
455454
>
456455
Previous
457-
</Button>
458-
<Button
459-
variant='active'
460-
className='h-[28px] text-caption'
456+
</Chip>
457+
<Chip
458+
variant='border-shadow'
461459
onClick={() =>
462460
setAdminParams((prev) => ({ offset: prev.offset + PAGE_SIZE }))
463461
}
464462
disabled={usersOffset + PAGE_SIZE >= (usersData?.total ?? 0) || usersLoading}
465463
>
466464
Next
467-
</Button>
465+
</Chip>
468466
</div>
469467
</div>
470468
)}

‎apps/sim/app/workspace/[workspaceId]/settings/components/mothership/mothership.tsx‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { useCallback, useMemo, useState } from 'react'
44
import {
55
Badge,
6-
Button,
6+
Chip,
77
ChipCopyInput,
88
ChipInput,
99
ChipModalTabs,
@@ -434,14 +434,13 @@ function LicensesTab({ environment }: { environment: MothershipEnv }) {
434434
className='w-[160px]'
435435
/>
436436
</div>
437-
<Button
437+
<Chip
438438
variant='primary'
439-
className='h-[32px]'
440439
onClick={handleGenerate}
441440
disabled={generateLicense.isPending || !newName.trim()}
442441
>
443442
{generateLicense.isPending ? 'Generating...' : 'Generate'}
444-
</Button>
443+
</Chip>
445444
</div>
446445

447446
{generatedKey && (

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/search-replace/components/replacement-controls/replacement-controls.tsx‎

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

3-
import { Button, ChipCombobox, ChipInput } from '@sim/emcn'
3+
import { Chip, ChipCombobox, ChipInput } from '@sim/emcn'
44
import type { WorkflowSearchReplacementOption } from '@/lib/workflows/search-replace/types'
55

66
interface ReplacementControlsProps {
@@ -60,22 +60,20 @@ export function ReplacementControls({
6060
{eligibleCount} replaceable match{eligibleCount === 1 ? '' : 'es'}
6161
</span>
6262
<div className='flex gap-1.5'>
63-
<Button
64-
className='h-8 text-xs'
65-
variant='default'
63+
<Chip
64+
variant='border-shadow'
6665
disabled={disabled || isApplying || !canReplaceActive}
6766
onClick={onReplaceActive}
6867
>
6968
Replace
70-
</Button>
71-
<Button
72-
className='h-8 text-xs'
73-
variant='active'
69+
</Chip>
70+
<Chip
71+
variant='border-shadow'
7472
disabled={disabled || isApplying || !canReplaceAll}
7573
onClick={onReplaceAll}
7674
>
7775
{isApplying ? 'Replacing...' : 'Replace All'}
78-
</Button>
76+
</Chip>
7977
</div>
8078
</div>
8179
</div>

‎apps/sim/app/workspace/[workspaceId]/w/components/preview/preview.tsx‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import type React from 'react'
44
import { useEffect, useMemo, useRef, useState } from 'react'
5-
import { Button, cn, OverflowText, Tooltip } from '@sim/emcn'
5+
import { Chip, cn, OverflowText, Tooltip } from '@sim/emcn'
66
import { ArrowLeft } from '@sim/emcn/icons'
77
import { redactApiKeys } from '@/lib/core/security/redaction'
88
import { PreviewEditor } from '@/app/workspace/[workspaceId]/w/components/preview/components/preview-editor'
@@ -295,14 +295,9 @@ export function Preview({
295295
<div className='absolute top-3 left-[12px] z-20 flex items-center gap-1.5'>
296296
<Tooltip.Root>
297297
<Tooltip.Trigger asChild>
298-
<Button
299-
variant='ghost'
300-
onClick={handleGoBack}
301-
className='flex h-[28px] gap-[5px] rounded-md border border-[var(--border)] bg-[var(--surface-2)] px-2.5 shadow-xs hover-hover:bg-[var(--surface-4)]'
302-
>
303-
<ArrowLeft className='size-[12px]' />
304-
<span className='text-caption'>Back</span>
305-
</Button>
298+
<Chip variant='border-shadow' leftIcon={ArrowLeft} onClick={handleGoBack}>
299+
Back
300+
</Chip>
306301
</Tooltip.Trigger>
307302
<Tooltip.Content side='bottom'>Go back to parent workflow</Tooltip.Content>
308303
</Tooltip.Root>

0 commit comments

Comments
 (0)