Skip to content

Commit 27d0467

Browse files
BillLeoutsakosvl346Bill Leoutsakos
andauthored
improvement(ui): use shared chips for ordinary actions (#8134)
Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
1 parent 39573f3 commit 27d0467

3 files changed

Lines changed: 21 additions & 18 deletions

File tree

‎apps/sim/app/(interfaces)/chat/components/error-state/error-state.tsx‎

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

3-
import { Button } from '@sim/emcn'
3+
import { Chip } from '@sim/emcn'
44
import { useRouter } from 'next/navigation'
55
import { APP_ENTRY_PATH } from '@/lib/navigation/paths'
66

@@ -18,13 +18,15 @@ export function ChatErrorState({ error }: ChatErrorStateProps) {
1818
Chat Unavailable
1919
</h1>
2020
<p className='text-[var(--text-muted)] text-lg'>{error}</p>
21-
<Button
21+
<Chip
2222
variant='primary'
2323
onClick={() => router.push(APP_ENTRY_PATH)}
24-
className='h-[32px] w-full gap-2 px-2.5 text-sm'
24+
fullWidth
25+
type='button'
26+
className='text-center'
2527
>
2628
Open Sim
27-
</Button>
29+
</Chip>
2830
</div>
2931
</div>
3032
)

‎apps/sim/app/(interfaces)/resume/[workflowId]/[executionId]/resume-page-client.tsx‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -781,17 +781,18 @@ export default function ResumeExecutionPage({
781781
</div>
782782
<Tooltip.Root>
783783
<Tooltip.Trigger asChild>
784-
<Button
784+
<Chip
785785
variant='outline'
786-
size='sm'
786+
type='button'
787787
onClick={handleRefreshExecution}
788788
disabled={refreshingExecution}
789-
className='gap-1.5 px-2.5'
789+
leftAdornment={
790+
<RefreshCw className={cn('size-[14px]', refreshingExecution && 'animate-spin')} />
791+
}
790792
aria-label='Refresh execution details'
791793
>
792-
<RefreshCw className={cn('size-[14px]', refreshingExecution && 'animate-spin')} />
793794
Refresh
794-
</Button>
795+
</Chip>
795796
</Tooltip.Trigger>
796797
<Tooltip.Content>Refresh</Tooltip.Content>
797798
</Tooltip.Root>

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

Lines changed: 9 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,22 @@ 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+
type='button'
65+
variant='outline'
6666
disabled={disabled || isApplying || !canReplaceActive}
6767
onClick={onReplaceActive}
6868
>
6969
Replace
70-
</Button>
71-
<Button
72-
className='h-8 text-xs'
73-
variant='active'
70+
</Chip>
71+
<Chip
72+
type='button'
73+
active
7474
disabled={disabled || isApplying || !canReplaceAll}
7575
onClick={onReplaceAll}
7676
>
7777
{isApplying ? 'Replacing...' : 'Replace All'}
78-
</Button>
78+
</Chip>
7979
</div>
8080
</div>
8181
</div>

0 commit comments

Comments
 (0)