Skip to content

Commit bdcbaa2

Browse files
committed
fix(badge): add type variant for dark mode contrast
1 parent 46ba315 commit bdcbaa2

File tree

9 files changed

+31
-8
lines changed

9 files changed

+31
-8
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components/api-info-modal.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,9 @@ export function ApiInfoModal({ open, onOpenChange, workflowId }: ApiInfoModalPro
203203
<span className='block truncate font-medium text-[14px] text-[var(--text-tertiary)]'>
204204
{field.name}
205205
</span>
206-
<Badge size='sm'>{field.type || 'string'}</Badge>
206+
<Badge variant='type' size='sm'>
207+
{field.type || 'string'}
208+
</Badge>
207209
</div>
208210
</div>
209211
<div className='border-[var(--border-1)] border-t px-[10px] pt-[6px] pb-[10px]'>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/mcp/mcp.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,9 @@ export function McpDeploy({
511511
<span className='block truncate font-medium text-[14px] text-[var(--text-tertiary)]'>
512512
{field.name}
513513
</span>
514-
<Badge size='sm'>{field.type}</Badge>
514+
<Badge variant='type' size='sm'>
515+
{field.type}
516+
</Badge>
515517
</div>
516518
</div>
517519
<div className='border-[var(--border-1)] border-t px-[10px] pt-[6px] pb-[10px]'>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,9 @@ export function DocumentTagEntry({
245245
{tag.collapsed ? tag.tagName || `Tag ${index + 1}` : `Tag ${index + 1}`}
246246
</span>
247247
{tag.collapsed && tag.tagName && (
248-
<Badge size='sm'>{FIELD_TYPE_LABELS[tag.fieldType] || 'Text'}</Badge>
248+
<Badge variant='type' size='sm'>
249+
{FIELD_TYPE_LABELS[tag.fieldType] || 'Text'}
250+
</Badge>
249251
)}
250252
</div>
251253
<div className='flex items-center gap-[8px] pl-[8px]' onClick={(e) => e.stopPropagation()}>

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,11 @@ function InputMappingField({
223223
<span className='block truncate font-medium text-[14px] text-[var(--text-tertiary)]'>
224224
{fieldName}
225225
</span>
226-
{fieldType && <Badge size='sm'>{fieldType}</Badge>}
226+
{fieldType && (
227+
<Badge variant='type' size='sm'>
228+
{fieldType}
229+
</Badge>
230+
)}
227231
</div>
228232
</div>
229233

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,9 @@ export function KnowledgeTagFilters({
238238
{filter.collapsed ? filter.tagName || `Filter ${index + 1}` : `Filter ${index + 1}`}
239239
</span>
240240
{filter.collapsed && filter.tagName && (
241-
<Badge size='sm'>{FIELD_TYPE_LABELS[filter.fieldType] || 'Text'}</Badge>
241+
<Badge variant='type' size='sm'>
242+
{FIELD_TYPE_LABELS[filter.fieldType] || 'Text'}
243+
</Badge>
242244
)}
243245
</div>
244246
<div className='flex items-center gap-[8px] pl-[8px]' onClick={(e) => e.stopPropagation()}>

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,11 @@ export function FieldFormat({
310310
<span className='block truncate font-medium text-[14px] text-[var(--text-tertiary)]'>
311311
{field.name || `${title} ${index + 1}`}
312312
</span>
313-
{field.name && showType && <Badge size='sm'>{field.type}</Badge>}
313+
{field.name && showType && (
314+
<Badge variant='type' size='sm'>
315+
{field.type}
316+
</Badge>
317+
)}
314318
</div>
315319
<div className='flex items-center gap-[8px] pl-[8px]' onClick={(e) => e.stopPropagation()}>
316320
<Button variant='ghost' onClick={addField} disabled={isReadOnly} className='h-auto p-0'>

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,11 @@ export function VariablesInput({
345345
<span className='block truncate font-medium text-[14px] text-[var(--text-tertiary)]'>
346346
{assignment.variableName || `Variable ${index + 1}`}
347347
</span>
348-
{assignment.variableName && <Badge size='sm'>{assignment.type}</Badge>}
348+
{assignment.variableName && (
349+
<Badge variant='type' size='sm'>
350+
{assignment.type}
351+
</Badge>
352+
)}
349353
</div>
350354
<div
351355
className='flex items-center gap-[8px] pl-[8px]'

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-modal/components/workflow-mcp-servers/workflow-mcp-servers.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,9 @@ function ServerDetailView({ workspaceId, serverId, onBack }: ServerDetailViewPro
611611
<span className='block truncate font-medium text-[14px] text-[var(--text-tertiary)]'>
612612
{name}
613613
</span>
614-
<Badge size='sm'>{prop.type || 'any'}</Badge>
614+
<Badge variant='type' size='sm'>
615+
{prop.type || 'any'}
616+
</Badge>
615617
</div>
616618
</div>
617619
<div className='border-[var(--border-1)] border-t px-[10px] pt-[6px] pb-[10px]'>

apps/sim/components/emcn/components/badge/badge.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const badgeVariants = cva(
1616
'gap-[4px] rounded-[40px] border border-[var(--border)] text-[var(--text-secondary)] bg-[var(--surface-4)] hover:text-[var(--text-primary)] hover:border-[var(--border-1)] hover:bg-[var(--surface-6)] dark:hover:bg-[var(--surface-5)]',
1717
outline:
1818
'gap-[4px] rounded-[40px] border border-[var(--border-1)] bg-transparent text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-5)] dark:hover:bg-transparent dark:hover:border-[var(--surface-6)]',
19+
type: 'gap-[4px] rounded-[40px] border border-[var(--border)] text-[var(--text-secondary)] bg-[var(--surface-4)] dark:bg-[var(--surface-6)]',
1920
green: `${STATUS_BASE} bg-[#bbf7d0] text-[#15803d] dark:bg-[rgba(34,197,94,0.2)] dark:text-[#86efac]`,
2021
red: `${STATUS_BASE} bg-[#fecaca] text-[var(--text-error)] dark:bg-[#551a1a] dark:text-[var(--text-error)]`,
2122
gray: `${STATUS_BASE} bg-[#e7e5e4] text-[#57534e] dark:bg-[var(--terminal-status-info-bg)] dark:text-[var(--terminal-status-info-color)]`,

0 commit comments

Comments
 (0)