Add untracked chart and schema files

This commit is contained in:
2026-03-13 00:11:59 -04:00
parent 8a8c4f7177
commit 01199d489a
16 changed files with 1794 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
import { cn } from '@/lib/utils';
type ChartContainerProps = {
children: React.ReactNode;
height?: number;
loading?: boolean;
error?: string | null;
className?: string;
};
export function ChartContainer({
children,
height = 400,
loading = false,
error = null,
className
}: ChartContainerProps) {
return (
<div
className={cn(
'relative w-full rounded-xl border border-[color:var(--line-weak)] bg-[color:var(--panel-soft)]',
className
)}
style={{ height: `${height}px` }}
>
{loading && (
<div className="absolute inset-0 flex items-center justify-center">
<div className="text-sm text-[color:var(--terminal-muted)]">Loading chart...</div>
</div>
)}
{error && (
<div className="absolute inset-0 flex items-center justify-center">
<div className="text-sm text-[color:var(--danger)]">{error}</div>
</div>
)}
{!loading && !error && (
<div className="h-full w-full p-4">
{children}
</div>
)}
</div>
);
}