feat(ui): add accent badge variant

This commit is contained in:
usrnk1
2026-07-13 10:45:57 +02:00
parent dd02cea9e7
commit 140e796b21
3 changed files with 17 additions and 3 deletions
+5 -2
View File
@@ -1,14 +1,17 @@
import { type ComponentProps, splitProps } from "solid-js"
import "./badge-v2.css"
export interface TagProps extends ComponentProps<"span"> {}
export interface TagProps extends ComponentProps<"span"> {
variant?: "neutral" | "accent"
}
export function Tag(props: TagProps) {
const [split, rest] = splitProps(props, ["class", "classList", "children"])
const [split, rest] = splitProps(props, ["class", "classList", "children", "variant"])
return (
<span
{...rest}
data-component="tag"
data-variant={split.variant ?? "neutral"}
classList={{
...split.classList,
[split.class ?? ""]: !!split.class,