import React from 'react';
// material-ui
import { useTheme } from '@mui/material/styles';
import { Box, Card, Grid, Typography } from '@mui/material';
// third party
import Chart, { Props as ChartProps } from 'react-apexcharts';
export interface SalesLineChartCardProps {
bgColor?: string;
chartData?: ChartProps;
footerData?: { value: string; label: string }[];
icon?: React.ReactNode | string;
title?: string;
percentage?: string;
}
// ============================|| SALES LINE CARD ||============================ //
const SalesLineChartCard = ({ bgColor, chartData, footerData, icon, title, percentage }: SalesLineChartCardProps) => {
const theme = useTheme();
let footerHtml;
if (footerData) {
footerHtml = footerData.map((item, index) => (
{item.value}
{item.label}
));
}
return (
{title && (
{title}
)}
{icon && (
{icon}
)}
{percentage && (
{percentage}
)}
{chartData && (
)}
{footerData && (
{footerHtml}
)}
);
};
export default SalesLineChartCard;