front-hub/src/components/SectionWrapper.tsx

31 lines
760 B
TypeScript
Raw Normal View History

2022-11-17 12:25:23 +00:00
import { Breakpoint, Container, SxProps, Theme } from "@mui/material";
import React, { ElementType } from "react";
interface Props {
component?: ElementType;
sx?: SxProps<Theme>;
innerSx: SxProps<Theme>;
maxWidth?: false | Breakpoint;
children?: React.ReactNode;
}
export default function SectionWrapper({ component, sx, innerSx, children, maxWidth }: Props) {
return (
<Container
component={component || "div"}
maxWidth={false}
disableGutters
sx={sx}
>
<Container
disableGutters
maxWidth={maxWidth}
sx={innerSx}
>
{children}
</Container>
</Container>
);
}