49 lines
1.1 KiB
TypeScript
49 lines
1.1 KiB
TypeScript
'use client';
|
|
|
|
import { Icon } from '@/ui/Icon';
|
|
import { Stack } from '@/ui/primitives/Stack';
|
|
import { Text } from '@/ui/Text';
|
|
import { LucideIcon } from 'lucide-react';
|
|
import React from 'react';
|
|
|
|
interface AdminEmptyStateProps {
|
|
icon: LucideIcon;
|
|
title: string;
|
|
description?: string;
|
|
action?: React.ReactNode;
|
|
}
|
|
|
|
/**
|
|
* AdminEmptyState
|
|
*
|
|
* Semantic empty state for admin lists and tables.
|
|
* Follows "Precision Racing Minimal" theme.
|
|
*/
|
|
export function AdminEmptyState({
|
|
icon,
|
|
title,
|
|
description,
|
|
action
|
|
}: AdminEmptyStateProps) {
|
|
return (
|
|
<Stack center py={20} gap={4}>
|
|
<Icon icon={icon} size={12} color="#23272B" />
|
|
<Stack align="center">
|
|
<Text size="lg" weight="bold" color="text-white" block textAlign="center">
|
|
{title}
|
|
</Text>
|
|
{description && (
|
|
<Text size="sm" color="text-gray-500" block mt={1} textAlign="center">
|
|
{description}
|
|
</Text>
|
|
)}
|
|
</Stack>
|
|
{action && (
|
|
<Stack mt={2}>
|
|
{action}
|
|
</Stack>
|
|
)}
|
|
</Stack>
|
|
);
|
|
}
|