Skip to content

Commit 76d44d6

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
refactor(emcn): centralize destructive ghost button colors
1 parent 0b7c6ae commit 76d44d6

12 files changed

Lines changed: 32 additions & 22 deletions

File tree

‎apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/document-tags-modal/document-tags-modal.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,12 +408,12 @@ export function DocumentTagsModal({
408408
<div className='flex shrink-0 items-center gap-1'>
409409
<Button
410410
aria-label='Remove tag'
411-
variant='ghost'
411+
variant='ghost-destructive-muted'
412412
onClick={(e) => {
413413
e.stopPropagation()
414414
handleRemoveTag(index)
415415
}}
416-
className='size-4 p-0 text-[var(--text-muted)] hover-hover:text-[var(--text-error)]'
416+
className='size-4 p-0'
417417
>
418418
<Trash className='size-3' />
419419
</Button>

‎apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/base-tags-modal/base-tags-modal.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,12 +294,12 @@ export function BaseTagsModal({ open, onOpenChange, knowledgeBaseId }: BaseTagsM
294294
<div className='flex shrink-0 items-center gap-1'>
295295
<Button
296296
aria-label='Delete Tag'
297-
variant='ghost'
297+
variant='ghost-destructive-muted'
298298
onClick={(e) => {
299299
e.stopPropagation()
300300
handleDeleteTagClick(tag)
301301
}}
302-
className='size-4 p-0 text-[var(--text-muted)] hover-hover:text-[var(--text-error)]'
302+
className='size-4 p-0'
303303
>
304304
<Trash className='size-3' />
305305
</Button>

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/condition-input/condition-input.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,12 +1023,12 @@ export function ConditionInput({
10231023
<Tooltip.Root>
10241024
<Tooltip.Trigger asChild>
10251025
<Button
1026-
variant='ghost'
1026+
variant='ghost-destructive'
10271027
onClick={() => removeBlock(block.id)}
10281028
disabled={
10291029
isPreview || disabled || conditionalBlocks.length <= (isRouterMode ? 1 : 2)
10301030
}
1031-
className='h-auto p-0 text-[var(--text-error)] hover-hover:text-[var(--text-error)]'
1031+
className='h-auto p-0'
10321032
>
10331033
<Trash className='size-[14px]' />
10341034
<span className='sr-only'>Delete Block</span>

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/document-tag-entry/document-tag-entry.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,10 @@ export function DocumentTagEntry({
274274
<span className='sr-only'>Add Tag</span>
275275
</Button>
276276
<Button
277-
variant='ghost'
277+
variant='ghost-destructive'
278278
onClick={() => removeTag(tag.id)}
279279
disabled={isReadOnly}
280-
className='h-auto p-0 text-[var(--text-error)] hover-hover:text-[var(--text-error)]'
280+
className='h-auto p-0'
281281
>
282282
<Trash className='size-[14px]' />
283283
<span className='sr-only'>Delete Tag</span>

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/eval-input/eval-input.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ export function EvalInput({
159159
<Tooltip.Root key={`remove-${metric.id}`}>
160160
<Tooltip.Trigger asChild>
161161
<Button
162-
variant='ghost'
162+
variant='ghost-destructive'
163163
onClick={() => removeMetric(metric.id)}
164164
disabled={isPreview || disabled || metrics.length === 1}
165-
className='h-auto p-0 text-[var(--text-error)] hover-hover:text-[var(--text-error)]'
165+
className='h-auto p-0'
166166
>
167167
<Trash className='size-[14px]' />
168168
<span className='sr-only'>Delete Metric</span>

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/filter-builder/components/filter-rule-row.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ export function FilterRuleRow({
142142
<span className='sr-only'>Add Condition</span>
143143
</Button>
144144
<Button
145-
variant='ghost'
145+
variant='ghost-destructive'
146146
onClick={() => onRemove(rule.id)}
147147
disabled={isReadOnly}
148-
className='h-auto p-0 text-[var(--text-error)] hover-hover:text-[var(--text-error)]'
148+
className='h-auto p-0'
149149
>
150150
<Trash className='size-[14px]' />
151151
<span className='sr-only'>Delete Condition</span>

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/knowledge-tag-filters/knowledge-tag-filters.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,13 @@ export function KnowledgeTagFilters({
266266
<span className='sr-only'>Add Filter</span>
267267
</Button>
268268
<Button
269-
variant='ghost'
269+
variant='ghost-destructive'
270270
onClick={(e) => {
271271
e.stopPropagation()
272272
removeFilter(filter.id)
273273
}}
274274
disabled={isReadOnly}
275-
className='h-auto p-0 text-[var(--text-error)] hover-hover:text-[var(--text-error)]'
275+
className='h-auto p-0'
276276
>
277277
<Trash className='size-[14px]' />
278278
<span className='sr-only'>Delete Filter</span>

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/sort-builder/components/sort-rule-row.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ export function SortRuleRow({
101101
<span className='sr-only'>Add Sort</span>
102102
</Button>
103103
<Button
104-
variant='ghost'
104+
variant='ghost-destructive'
105105
onClick={() => onRemove(rule.id)}
106106
disabled={isReadOnly}
107-
className='h-auto p-0 text-[var(--text-error)] hover-hover:text-[var(--text-error)]'
107+
className='h-auto p-0'
108108
>
109109
<Trash className='size-[14px]' />
110110
<span className='sr-only'>Delete Sort</span>

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/starter/input-format.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,10 +422,10 @@ export function FieldFormat({
422422
<span className='sr-only'>Add {title}</span>
423423
</Button>
424424
<Button
425-
variant='ghost'
425+
variant='ghost-destructive'
426426
onClick={() => removeField(field.id)}
427427
disabled={isReadOnly}
428-
className='h-auto p-0 text-[var(--text-error)] hover-hover:text-[var(--text-error)] hover-hover:opacity-90'
428+
className='h-auto p-0 hover-hover:opacity-90'
429429
>
430430
<Trash className='size-[14px]' />
431431
<span className='sr-only'>Delete Field</span>

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/variables-input/variables-input.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,13 +440,13 @@ export function VariablesInput({
440440
<span className='sr-only'>Add Variable</span>
441441
</Button>
442442
<Button
443-
variant='ghost'
443+
variant='ghost-destructive'
444444
onClick={(e) => {
445445
e.stopPropagation()
446446
removeAssignment(assignment.id)
447447
}}
448448
disabled={isReadOnly}
449-
className='h-auto p-0 text-[var(--text-error)] hover-hover:text-[var(--text-error)]'
449+
className='h-auto p-0'
450450
>
451451
<Trash className='size-[14px]' />
452452
<span className='sr-only'>Delete Variable</span>

0 commit comments

Comments
 (0)