From eb7660864da7e50965d39ba873152cfe4fe51a31 Mon Sep 17 00:00:00 2001 From: johndoe6345789 Date: Sat, 17 Jan 2026 11:16:56 +0000 Subject: [PATCH] Generated by Spark: Fix all reported errors. --- src/components/atoms/DataSourceBadge.tsx | 43 ++++++++++++------------ 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/src/components/atoms/DataSourceBadge.tsx b/src/components/atoms/DataSourceBadge.tsx index e599878..8d2b2de 100644 --- a/src/components/atoms/DataSourceBadge.tsx +++ b/src/components/atoms/DataSourceBadge.tsx @@ -1,37 +1,38 @@ import { Badge } from '@/components/ui/badge' -import { Database, Function, FileText } from '@phosphor-icons/react' import { DataSourceType } from '@/types/json-ui' +import { Database, Function, File } from '@phosphor-icons/react' interface DataSourceBadgeProps { type: DataSourceType className?: string } -const icons = { - kv: Database, - computed: Function, - static: FileText, -} - -const labels = { - kv: 'KV Store', - computed: 'Computed', - static: 'Static', -} - -const variants = { - kv: 'bg-accent/20 text-accent border-accent/40', - computed: 'bg-primary/20 text-primary border-primary/40', - static: 'bg-muted text-muted-foreground border-border', +const dataSourceConfig = { + kv: { + icon: Database, + label: 'KV Storage', + className: 'bg-accent/20 text-accent border-accent/30' + }, + computed: { + icon: Function, + label: 'Computed', + className: 'bg-primary/20 text-primary border-primary/30' + }, + static: { + icon: File, + label: 'Static', + className: 'bg-muted text-muted-foreground border-border' + } } export function DataSourceBadge({ type, className = '' }: DataSourceBadgeProps) { - const Icon = icons[type] + const config = dataSourceConfig[type] + const Icon = config.icon return ( - - - {labels[type]} + + + {config.label} ) }