import { Card, Group, Progress, Stack, Text, Title, useMantineColorScheme, } from "@mantine/core"; interface HealthProgressItem { label: string; value: number; color: string; } interface HealthStatsProps { data?: HealthProgressItem[]; } export const HealthStats = ({ data }: HealthStatsProps) => { const { colorScheme } = useMantineColorScheme(); const dark = colorScheme === "dark"; const defaultData: HealthProgressItem[] = [ { label: "Imunisasi Lengkap", value: 92, color: "green" }, { label: "Pemeriksaan Rutin", value: 88, color: "blue" }, { label: "Gizi Baik", value: 86, color: "teal" }, { label: "Target Stunting", value: 14, color: "red" }, ]; const displayData = data || defaultData; return ( Statistik Kesehatan {displayData.map((item) => (
{item.label} {item.value}%
))}
); };