refactor: remove CheckIcon from TagSelector and adjust selected tag styling

This commit is contained in:
mlogclub
2026-05-30 11:26:26 +08:00
parent 8398cd6f91
commit 6a27305749
+6 -7
View File
@@ -1,7 +1,6 @@
"use client"
import {
CheckIcon,
ChevronRightIcon,
ChevronsUpDownIcon,
Loader2Icon,
@@ -253,6 +252,11 @@ export function TagSelector(props: TagSelectorProps) {
value={tag.searchableText}
disabled={disabled || pendingTagId !== null}
onSelect={() => handleSelect(tag.id)}
className={cn(
props.mode === "single" &&
checked &&
"bg-muted text-foreground"
)}
>
<div
className="flex min-w-0 flex-1 items-center gap-1.5"
@@ -293,12 +297,7 @@ export function TagSelector(props: TagSelectorProps) {
className="pointer-events-none"
/>
) : (
<CheckIcon
className={cn(
"size-4 shrink-0",
checked ? "opacity-100" : "opacity-0"
)}
/>
<span className="size-4 shrink-0" />
)}
<span className="min-w-0 flex-1 truncate">{tag.name}</span>
</div>