All files / src/pages/AcquirerPortal/LegalDocuments/LegalDocumentDetail/components DocumentContent.tsx

100% Statements 2/2
55.55% Branches 5/9
100% Functions 1/1
100% Lines 2/2

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                          227x   227x                                  
import { Box } from "@mui/material";
import { useCustomThemeV2 } from "@theme/hooks/useCustomThemeV2";
import { ReactNode } from "react";
 
interface DocumentContentProps {
  children: ReactNode;
  hasMobileFooter?: boolean;
}
 
export default function DocumentContent({
  children,
  hasMobileFooter = false,
}: DocumentContentProps) {
  const { isMobileView } = useCustomThemeV2();
 
  return (
    <Box
      sx={{
        width: "100%",
        // Centered 768px text column (896px incl. the 64px side padding) per
        // the mockup (Figma 4087-7852); on mobile the padding alone governs.
        maxWidth: "896px",
        margin: "0 auto",
        padding: isMobileView ? "20px 16px" : "40px 64px",
        paddingTop: isMobileView ? "94px" : "40px",
        paddingBottom: hasMobileFooter && isMobileView ? "94px" : "40px",
      }}
    >
      {children}
    </Box>
  );
}