Frontend security / security (push) Successful in 9s
Frontend verify / verify (push) Failing after 37m50s
Frontend security / security (pull_request) Successful in 9s
Frontend verify / verify (pull_request) Failing after 42m10s
Conventional commits / commits (pull_request) Successful in 29s
Enable every plugin recommended preset and replace Biome with ESLint formatting. Preserve API contracts and JSX whitespace; verify source, tests, builds and tooling.
28 lines
604 B
TypeScript
28 lines
604 B
TypeScript
import type { FC, ReactNode } from "react";
|
|
|
|
import { Paper, Stack, Text, Title } from "@mantine/core";
|
|
|
|
type StateViewProps = {
|
|
action?: ReactNode;
|
|
error?: boolean;
|
|
text: string;
|
|
title: string;
|
|
};
|
|
|
|
const StateView: FC<StateViewProps> = (props) => {
|
|
const { action, error = false, text, title } = props;
|
|
const role = error ? "alert" : undefined;
|
|
|
|
return (
|
|
<Paper p="xl" radius="md" role={role} shadow="xs" withBorder>
|
|
<Stack align="flex-start" gap="sm">
|
|
<Title order={2}>{title}</Title>
|
|
<Text c="dimmed">{text}</Text>
|
|
{action}
|
|
</Stack>
|
|
</Paper>
|
|
);
|
|
};
|
|
|
|
export { StateView };
|