import PropTypes from 'prop-types'; import { Avatar, Box, Card, CardContent, Skeleton, Stack, Typography } from '@mui/material'; // ==============================|| STAT / KPI CARD (Doormile-style) ||============================== // // Clean metric card: muted label, large value, a single soft-tinted rounded // avatar holding the icon. No coloured top-stripe, no rainbow — colour appears // only in the small avatar so a row of cards reads calm and corporate. // // `icon` is a rendered node, e.g. icon={}. // `color` is a hex accent (defaults to brand purple); `caption` is the small // muted line under the value (e.g. "96% of total"). export default function StatCard({ title, value, icon, color = '#C01227', caption, loading = false }) { return ( {title} {loading ? ( ) : ( {value} )} {caption && ( {caption} )} {icon && ( {icon} )} ); } StatCard.propTypes = { title: PropTypes.node, value: PropTypes.node, icon: PropTypes.node, color: PropTypes.string, caption: PropTypes.node, loading: PropTypes.bool };