website refactor
This commit is contained in:
49
apps/website/components/admin/AdminEmptyState.tsx
Normal file
49
apps/website/components/admin/AdminEmptyState.tsx
Normal file
@@ -0,0 +1,49 @@
|
||||
'use client';
|
||||
|
||||
import React from 'react';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { LucideIcon } from 'lucide-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" />
|
||||
<Box textAlign="center">
|
||||
<Text size="lg" weight="bold" color="text-white" block>
|
||||
{title}
|
||||
</Text>
|
||||
{description && (
|
||||
<Text size="sm" color="text-gray-500" block mt={1}>
|
||||
{description}
|
||||
</Text>
|
||||
)}
|
||||
</Box>
|
||||
{action && (
|
||||
<Box mt={2}>
|
||||
{action}
|
||||
</Box>
|
||||
)}
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user