Skip to content

Commit d1e51d0

Browse files
committed
style: Searchbox theme token
1 parent 8d704ff commit d1e51d0

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

packages/design-system/src/css/style.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
--color-bypass: #6a246a;
9999
--color-error: #962a2a;
100100

101-
--color-comfy-menu-secondary: var(--comfy-menu-secondary-bg);
102101

103102
--color-interface-panel-job-progress-primary: var(--color-azure-300);
104103
--color-interface-panel-job-progress-secondary: var(--color-alpha-azure-600-30);
@@ -438,7 +437,11 @@
438437
--color-interface-button-hover-surface: var(
439438
--interface-button-hover-surface
440439
);
440+
--color-comfy-input: var(--comfy-input-bg);
441+
--color-comfy-input-foreground: var(--input-text);
441442
--color-comfy-menu-bg: var(--comfy-menu-bg);
443+
--color-comfy-menu-secondary: var(--comfy-menu-secondary-bg);
444+
442445
--color-interface-stroke: var(--interface-stroke);
443446
--color-nav-background: var(--nav-background);
444447
--color-node-border: var(--node-border);

src/components/input/SearchBox.vue

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
<template>
2-
<div :class="wrapperStyle" @click="focusInput">
3-
<i class="icon-[lucide--search] text-muted-foreground" />
2+
<div
3+
:class="
4+
cn(
5+
'relative flex w-full items-center gap-2 bg-comfy-input cursor-text text-comfy-input-foreground',
6+
wrapperStyle
7+
)
8+
"
9+
@click="focusInput"
10+
>
11+
<i class="icon-[lucide--search]" />
412
<InputText
513
ref="input"
614
v-model="internalSearchQuery"
@@ -12,7 +20,7 @@
1220
"
1321
type="text"
1422
unstyled
15-
class="absolute inset-0 size-full pl-11 border-none outline-none bg-transparent text-sm text-base-foreground"
23+
class="absolute inset-0 size-full pl-11 border-none outline-none bg-transparent text-sm"
1624
/>
1725
</div>
1826
</template>
@@ -72,14 +80,8 @@ const focusInput = () => {
7280
onMounted(() => autofocus && focusInput())
7381
7482
const wrapperStyle = computed(() => {
75-
const baseClasses =
76-
'relative flex w-full items-center gap-2 bg-secondary-background cursor-text'
77-
7883
if (showBorder) {
79-
return cn(
80-
baseClasses,
81-
'rounded p-2 border border-solid border-border-default'
82-
)
84+
return cn('rounded p-2 border border-solid border-border-default')
8385
}
8486
8587
// Size-specific classes matching button sizes for consistency
@@ -88,6 +90,6 @@ const wrapperStyle = computed(() => {
8890
lg: 'h-10 px-4 py-2' // Matches button md size
8991
}[size]
9092
91-
return cn(baseClasses, 'rounded-lg', sizeClasses)
93+
return cn('rounded-lg', sizeClasses)
9294
})
9395
</script>

0 commit comments

Comments
 (0)