/** ========================================================= * Material Dashboard 2 PRO React TS - v1.0.0 ========================================================= * Product Page: https://www.creative-tim.com/product/material-dashboard-2-pro-react-ts * Copyright 2022 Creative Tim (https://www.creative-tim.com) Coded by www.creative-tim.com ========================================================= * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. */ import { ReactNode } from "react"; // @mui material components import Card from "@mui/material/Card"; import Divider from "@mui/material/Divider"; import Icon from "@mui/material/Icon"; // Material Dashboard 2 PRO React TS components import MDBox from "components/MDBox"; import MDTypography from "components/MDTypography"; // Declaring props types for CompleStatisticsCard interface Props { color?: "primary" | "secondary" | "info" | "success" | "warning" | "error" | "light" | "dark"; title: string; count: string | number; percentage?: { color: "primary" | "secondary" | "info" | "success" | "warning" | "error" | "dark" | "white"; amount: string | number; label: string; }; icon: ReactNode; [key: string]: any; } function ComplexStatisticsCard({ color, title, count, percentage, icon }: Props): JSX.Element { return ( {icon} {title} {count} {percentage.amount}  {percentage.label} ); } // Declaring defualt props for ComplexStatisticsCard ComplexStatisticsCard.defaultProps = { color: "info", percentage: { color: "success", text: "", label: "", }, }; export default ComplexStatisticsCard;