diff options
| author | Volpeon <git@volpeon.ink> | 2026-07-22 19:40:59 +0200 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2026-07-22 19:40:59 +0200 |
| commit | c1e28224aa2e1450031669d9a7e359b63e04687d (patch) | |
| tree | 68f3d8905c763a91f68001d868197effa92adafa /src/ui/objects/StatusIndicator.tsx | |
| download | corvos-website-c1e28224aa2e1450031669d9a7e359b63e04687d.tar.gz corvos-website-c1e28224aa2e1450031669d9a7e359b63e04687d.tar.bz2 corvos-website-c1e28224aa2e1450031669d9a7e359b63e04687d.zip | |
Init
Diffstat (limited to 'src/ui/objects/StatusIndicator.tsx')
| -rw-r--r-- | src/ui/objects/StatusIndicator.tsx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ui/objects/StatusIndicator.tsx b/src/ui/objects/StatusIndicator.tsx new file mode 100644 index 0000000..06b6481 --- /dev/null +++ b/src/ui/objects/StatusIndicator.tsx | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | import type { HTMLAttributes } from "corvos/plugins/jsx.ts"; | ||
| 2 | |||
| 3 | export type Props = HTMLAttributes<"div"> & { | ||
| 4 | status?: "accent" | "positive" | "negative" | "warning"; | ||
| 5 | }; | ||
| 6 | |||
| 7 | export const StatusIndicator = ({ status, class: cls, ...props }: Props) => ( | ||
| 8 | <div | ||
| 9 | class:list={[ | ||
| 10 | "o-status-indicator", | ||
| 11 | { | ||
| 12 | [`is-${status}`]: status, | ||
| 13 | }, | ||
| 14 | cls, | ||
| 15 | ]} | ||
| 16 | {...props} | ||
| 17 | /> | ||
| 18 | ); | ||
