import React from 'react'; import { Box, Typography, Paper, List, ListItem, ListItemText, ListItemSecondaryAction, Chip, IconButton, useTheme, useMediaQuery } from '@mui/material'; import MoreVertIcon from '@mui/icons-material/MoreVert'; const SalesByLocation = ({ data }) => { const theme = useTheme(); const isSmallScreen = useMediaQuery(theme.breakpoints.down('sm')); return ( Sales by Location Sales performance by location {data.map((item, i) => ( {item.country} } secondary={ {item.sales} Sales } sx={{ my: 0 }} /> ${item.amount.toLocaleString()} 0 ? '+' : ''}${item.change}%`} color={item.change > 0 ? 'success' : item.change < 0 ? 'error' : 'default'} size={isSmallScreen ? 'small' : 'medium'} sx={{ fontSize: { xs: '11px', sm: '12px' }, height: { xs: '24px', sm: '28px' }, '& .MuiChip-label': { px: { xs: 0.5, sm: 1 } } }} /> ))} ); }; export default SalesByLocation;