feat(ui): port dashboard components to react
This commit is contained in:
parent
a71d66b1b8
commit
73abcc1b69
33 changed files with 1304 additions and 182 deletions
26
src/lib/ui/components/SystemState.tsx
Normal file
26
src/lib/ui/components/SystemState.tsx
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import type { UiSeverity } from "../types";
|
||||
import { IconGlyph } from "./IconGlyph";
|
||||
|
||||
export interface SystemStateProps {
|
||||
title: string;
|
||||
detail?: string;
|
||||
icon?: string;
|
||||
severity?: UiSeverity;
|
||||
}
|
||||
|
||||
export function SystemState({
|
||||
title,
|
||||
detail,
|
||||
icon = "mdi:information-outline",
|
||||
severity = "neutral",
|
||||
}: SystemStateProps) {
|
||||
return (
|
||||
<section className="system-state" data-severity={severity}>
|
||||
<IconGlyph name={icon} size="lg" />
|
||||
<div>
|
||||
<h2>{title}</h2>
|
||||
{detail ? <p>{detail}</p> : null}
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue