chore: codify React component style

This commit is contained in:
2026-08-25 15:33:20 +03:00
parent 268acdf2e1
commit d10e1dd182
65 changed files with 711 additions and 365 deletions
+5 -10
View File
@@ -1,5 +1,5 @@
import { Button, Loader, Paper, Stack, Text, Title } from "@mantine/core";
import type { ReactNode } from "react";
import type { FC, ReactNode } from "react";
type StateViewProps = {
title: string;
@@ -9,13 +9,8 @@ type StateViewProps = {
error?: boolean;
};
export function StateView({
title,
text,
action,
loading = false,
error = false,
}: StateViewProps) {
const StateView: FC<StateViewProps> = (props) => {
const { title, text, action, loading = false, error = false } = props;
const role = loading ? "status" : error ? "alert" : undefined;
return (
@@ -28,6 +23,6 @@ export function StateView({
</Stack>
</Paper>
);
}
};
export { Button };
export { Button, StateView };