summaryrefslogtreecommitdiffstats
path: root/src/ui/objects/StatusIndicator.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/objects/StatusIndicator.tsx')
-rw-r--r--src/ui/objects/StatusIndicator.tsx18
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 @@
1import type { HTMLAttributes } from "corvos/plugins/jsx.ts";
2
3export type Props = HTMLAttributes<"div"> & {
4 status?: "accent" | "positive" | "negative" | "warning";
5};
6
7export 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);