fix: Replace tag removal icon with a button for better accessibility and event handling

This commit is contained in:
web@ppanel 2025-12-29 06:18:56 +00:00
parent 4d15b2b6fc
commit 3751f64f73

View File

@ -128,13 +128,18 @@ export function TagInput({
variant="outline"
>
{tag}
<X
className="size-4 cursor-pointer rounded-sm hover:text-destructive"
<button
className="ml-1 inline-flex items-center justify-center"
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
handleRemoveTag(index);
}}
/>
onMouseDown={(e) => e.preventDefault()}
type="button"
>
<X className="size-4 cursor-pointer rounded-sm hover:text-destructive" />
</button>
</Badge>
))}
<div className="flex min-w-0 flex-1 items-center gap-2">