Centralize shared WebUI structural primitives

This commit is contained in:
2026-08-18 13:17:31 +02:00
parent ee5c881df9
commit 7685a103e8
26 changed files with 767 additions and 81 deletions
+29
View File
@@ -0,0 +1,29 @@
import type { HTMLAttributes, ReactNode } from "react";
export type CountBadgeProps = HTMLAttributes<HTMLSpanElement> & {
children: ReactNode;
tone?: "accent" | "neutral" | "danger";
size?: "compact" | "default";
};
export default function CountBadge({
children,
tone = "accent",
size = "default",
className = "",
...props
}: CountBadgeProps) {
return (
<span
{...props}
className={[
"count-badge",
`count-badge-${tone}`,
`count-badge-${size}`,
className
].filter(Boolean).join(" ")}
>
{children}
</span>
);
}