summaryrefslogtreecommitdiffstats
path: root/src/ui/objects/Badge.tsx
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2026-07-22 19:40:59 +0200
committerVolpeon <git@volpeon.ink>2026-07-22 19:40:59 +0200
commitc1e28224aa2e1450031669d9a7e359b63e04687d (patch)
tree68f3d8905c763a91f68001d868197effa92adafa /src/ui/objects/Badge.tsx
downloadcorvos-website-c1e28224aa2e1450031669d9a7e359b63e04687d.tar.gz
corvos-website-c1e28224aa2e1450031669d9a7e359b63e04687d.tar.bz2
corvos-website-c1e28224aa2e1450031669d9a7e359b63e04687d.zip
Init
Diffstat (limited to 'src/ui/objects/Badge.tsx')
-rw-r--r--src/ui/objects/Badge.tsx19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ui/objects/Badge.tsx b/src/ui/objects/Badge.tsx
new file mode 100644
index 0000000..e98ef0d
--- /dev/null
+++ b/src/ui/objects/Badge.tsx
@@ -0,0 +1,19 @@
1import type { HTMLTag, Polymorphic } from "corvos/plugins/jsx.ts";
2
3import type { Props as ActionButtonProps } from "./ActionButton.tsx";
4
5import { ActionButton } from "./ActionButton.tsx";
6
7export type Props<Tag extends HTMLTag> = Polymorphic<{
8 as?: Tag;
9 variant?: ActionButtonProps<Tag>["variant"];
10 pill?: boolean;
11 selected?: boolean;
12 size?: ActionButtonProps<Tag>["size"];
13 children?: JSX.Element;
14}>;
15
16export const Badge = <T extends HTMLTag = "span">({ as = "span" as T, ...props }: Props<T>) => (
17 // deno-lint-ignore no-explicit-any
18 <ActionButton as={as} level="badge" {...(props as any)} />
19);