All files / src/components/common/TableFilters ModalContent.tsx

75% Statements 3/4
100% Branches 0/0
75% Functions 3/4
75% Lines 3/4

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                      20x                       111x   108x                              
import FadeUpWrapper from "@components/animation/FadeUpWrapper";
import { Box, Stack } from "@mui/material";
 
import SectionItem from "./SectionItem";
import { FilterSectionItemType, mapRange } from "./utils";
 
type Props = {
  sections: FilterSectionItemType[];
};
 
export default function ModalContent({ sections }: Props) {
  return (
    <Box
      flex={1}
      overflow="auto"
      sx={{ overflowX: "hidden" }}
      onTouchMove={(e) => {
        e.stopPropagation();
      }}
    >
      <FadeUpWrapper delay={150}>
        <Stack gap="16px">
          {sections
            .filter((item) => !item.hidden)
            .map((item) => (
              <SectionItem
                key={item.title}
                startIcon={item.startIcon}
                title={item.title}
                description={item.description}
                endElement={item.endElement}
              >
                {item.children}
              </SectionItem>
            ))}
        </Stack>
      </FadeUpWrapper>
    </Box>
  );
}