feat: establish frontend foundation

This commit is contained in:
2026-08-12 23:04:16 +03:00
parent 3331b7f684
commit 1e13adabd3
46 changed files with 2868 additions and 1588 deletions
+33
View File
@@ -0,0 +1,33 @@
import { Button, Loader, Paper, Stack, Text, Title } from "@mantine/core";
import type { ReactNode } from "react";
type StateViewProps = {
title: string;
text: string;
action?: ReactNode;
loading?: boolean;
error?: boolean;
};
export function StateView({
title,
text,
action,
loading = false,
error = false,
}: StateViewProps) {
const role = loading ? "status" : error ? "alert" : undefined;
return (
<Paper p="xl" radius="md" shadow="xs" withBorder role={role}>
<Stack align="flex-start" gap="sm">
{loading ? <Loader aria-label={title} size="sm" /> : null}
<Title order={2}>{title}</Title>
<Text c="dimmed">{text}</Text>
{action}
</Stack>
</Paper>
);
}
export { Button };