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" "use client"
import { import {
CheckIcon,
ChevronRightIcon, ChevronRightIcon,
ChevronsUpDownIcon, ChevronsUpDownIcon,
Loader2Icon, Loader2Icon,
@@ -253,6 +252,11 @@ export function TagSelector(props: TagSelectorProps) {
value={tag.searchableText} value={tag.searchableText}
disabled={disabled || pendingTagId !== null} disabled={disabled || pendingTagId !== null}
onSelect={() => handleSelect(tag.id)} onSelect={() => handleSelect(tag.id)}
className={cn(
props.mode === "single" &&
checked &&
"bg-muted text-foreground"
)}
> >
<div <div
className="flex min-w-0 flex-1 items-center gap-1.5" 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" className="pointer-events-none"
/> />
) : ( ) : (
<CheckIcon <span className="size-4 shrink-0" />
className={cn(
"size-4 shrink-0",
checked ? "opacity-100" : "opacity-0"
)}
/>
)} )}
<span className="min-w-0 flex-1 truncate">{tag.name}</span> <span className="min-w-0 flex-1 truncate">{tag.name}</span>
</div> </div>