40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
|
|
|
|
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
|
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
|
import { Container } from '@/ui/Container';
|
|
import { Stack } from '@/ui/Stack';
|
|
import { Text } from '@/ui/Text';
|
|
|
|
interface ErrorTemplateProps extends TemplateProps<ViewData> {
|
|
message?: string;
|
|
description?: string;
|
|
}
|
|
|
|
export function ErrorTemplate({ message = "An error occurred", description = "Please try again later" }: ErrorTemplateProps) {
|
|
return (
|
|
<Container size="lg">
|
|
<Stack align="center" gap={4} py={12}>
|
|
<Text color="text-red-400">{message}</Text>
|
|
<Text color="text-gray-400">{description}</Text>
|
|
</Stack>
|
|
</Container>
|
|
);
|
|
}
|
|
|
|
interface EmptyTemplateProps extends TemplateProps<ViewData> {
|
|
title: string;
|
|
description: string;
|
|
}
|
|
|
|
export function EmptyTemplate({ title, description }: EmptyTemplateProps) {
|
|
return (
|
|
<Container size="lg">
|
|
<Stack align="center" gap={2} py={12}>
|
|
<Text size="xl" weight="semibold" color="text-white">{title}</Text>
|
|
<Text color="text-gray-400">{description}</Text>
|
|
</Stack>
|
|
</Container>
|
|
);
|
|
}
|