// ** React Import import { ReactNode } from 'react' // ** MUI Imports import Box from '@mui/material/Box' import Card from '@mui/material/Card' import Table from '@mui/material/Table' import TableRow from '@mui/material/TableRow' import TableBody from '@mui/material/TableBody' import TableCell from '@mui/material/TableCell' import { useTheme } from '@mui/material/styles' import CardHeader from '@mui/material/CardHeader' import Typography from '@mui/material/Typography' import CardContent from '@mui/material/CardContent' import TableContainer from '@mui/material/TableContainer' // ** Icon Imports import Icon from 'src/@core/components/icon' // ** Third Party Imports import { ApexOptions } from 'apexcharts' // ** Type Import import { ThemeColor } from 'src/@core/layouts/types' // ** Custom Components Imports import OptionsMenu from 'src/@core/components/option-menu' import ReactApexcharts from 'src/@core/components/react-apexcharts' // ** Util Import import { hexToRGBA } from 'src/@core/utils/hex-to-rgba' interface DataType { title: string amount: string icon: ReactNode color: ThemeColor trendAmount: number } const data: DataType[] = [ { amount: '$845k', trendAmount: 82, color: 'primary', title: 'Google Analytics', icon: ( ) }, { trendAmount: 52, amount: '$12.5k', color: 'secondary', title: 'Facebook Ads', icon: ( ) } ] const series = [ { name: 'Google Analytics', data: [155, 135, 320, 100, 150, 335, 160] }, { name: 'Facebook Ads', data: [110, 235, 125, 230, 215, 115, 200] } ] const CardWidgetsExternalLinks = () => { // ** Hook const theme = useTheme() const options: ApexOptions = { chart: { stacked: true, parentHeightOffset: 0, toolbar: { show: false } }, plotOptions: { bar: { borderRadius: 10, columnWidth: '40%', endingShape: 'rounded', startingShape: 'rounded' } }, xaxis: { labels: { show: false }, axisTicks: { show: false }, axisBorder: { show: false }, categories: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] }, yaxis: { show: false }, colors: [hexToRGBA(theme.palette.primary.main, 1), hexToRGBA(theme.palette.secondary.main, 1)], grid: { strokeDashArray: 10, borderColor: theme.palette.divider, padding: { top: -12, left: -4, right: -5, bottom: -14 } }, legend: { show: false }, dataLabels: { enabled: false }, stroke: { width: 6, curve: 'smooth', lineCap: 'round', colors: [theme.palette.background.paper] }, states: { hover: { filter: { type: 'none' } }, active: { filter: { type: 'none' } } }, responsive: [ { breakpoint: theme.breakpoints.values.xl, options: { plotOptions: { bar: { columnWidth: '50%' } } } }, { breakpoint: theme.breakpoints.values.lg, options: { plotOptions: { bar: { columnWidth: '50%' } } } }, { breakpoint: theme.breakpoints.values.sm, options: { plotOptions: { bar: { columnWidth: '35%' } } } }, { breakpoint: 430, options: { plotOptions: { bar: { columnWidth: '45%' } } } } ] } return ( } /> {data.map((item, index) => ( {item.title} {item.amount} {`${item.trendAmount}%`} {item.icon} ))}
) } export default CardWidgetsExternalLinks