All files / src/components/common/Filter FilterMenu.tsx

100% Statements 3/3
100% Branches 0/0
100% Functions 2/2
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51      2x 3x                         3x                                                                  
import { styled } from "@mui/material/styles";
import Menu, { MenuProps } from "@mui/material/Menu";
 
const FilterMenu = styled((props: MenuProps) => (
  <Menu
    BackdropProps={{
      invisible: false,
      sx: {
        backgroundColor: "rgba(53, 53, 53, 0.1)",
      },
    }}
    MenuListProps={{
      "aria-labelledby": "filter",
      role: "filter",
    }}
    {...props}
  />
))(({ theme }) => ({
  top: 0,
  left: "-12px",
 
  "& .MuiPaper-root": {
    width: 282,
    padding: "24px 8px",
    borderRadius: "16px",
    margin: theme.spacing(1, 0, 0, -1),
    background: `#F8F8F6`, // neutral[9]
    boxShadow:
      "0px 20px 24px -4px rgba(16, 24, 40, 0.08), 0px 8px 8px -4px rgba(16, 24, 40, 0.03)",
  },
  "& .MuiList-root": {
    padding: 0,
  },
  "& .MuiMenuItem-root": {
    padding: "0",
    "&:not(:last-of-type)": {
      paddingBottom: "3px",
    },
    "&:hover": {
      color: "initial",
      background: "none",
    },
    "&.Mui-selected": {
      color: "initial",
      background: "none",
    },
  },
}));
 
export default FilterMenu;