import Box from '@mui/material/Box'; import type { CardProps } from '@mui/material/Card'; import Card from '@mui/material/Card'; import CardHeader from '@mui/material/CardHeader'; import Typography from '@mui/material/Typography'; import { varAlpha } from 'minimal-shared/utils'; import { Iconify } from 'src/components/iconify'; import { fShortenNumber } from 'src/utils/format-number'; // ---------------------------------------------------------------------- type Props = CardProps & { title?: string; subheader?: string; list: { value: string; label: string; total: number }[]; }; export function AnalyticsTrafficBySite({ title, subheader, list, sx, ...other }: Props) { return ( {list.map((site) => ( ({ py: 2.5, display: 'flex', borderRadius: 1.5, textAlign: 'center', alignItems: 'center', flexDirection: 'column', border: `solid 1px ${varAlpha(theme.vars.palette.grey['500Channel'], 0.12)}`, })} > {site.value === 'twitter' && } {site.value === 'facebook' && } {site.value === 'google' && } {site.value === 'linkedin' && } {fShortenNumber(site.total)} {site.label} ))} ); }