// Import Mantine components directly import { Badge, Group, Text, ThemeIcon } from "@mantine/core"; import type { ReactNode } from "react"; // Import custom Card and its sub-components import { Card } from "./ui/card"; interface DashboardCardProps { title: string; value: string | number; subtitle?: string; change?: string; icon: ReactNode; badge?: string; } export function DashboardCard({ title, value, subtitle, change, icon, badge, }: DashboardCardProps) { return (
{title} {value} {badge && ( {badge} )} {subtitle && ( {subtitle} )} {change && ( ↗ {change} )}
{icon}
); }