base-page.tsx 745 B

1234567891011121314151617181920212223242526272829303132
  1. import { Typography } from "@mui/material";
  2. import React from "react";
  3. interface Props {
  4. title?: React.ReactNode; // the page title
  5. header?: React.ReactNode; // something behind title
  6. contentStyle?: React.CSSProperties;
  7. }
  8. const BasePage: React.FC<Props> = (props) => {
  9. const { title, header, contentStyle, children } = props;
  10. return (
  11. <div className="base-page" data-windrag>
  12. <header data-windrag>
  13. <Typography variant="h4" component="h1">
  14. {title}
  15. </Typography>
  16. {header}
  17. </header>
  18. <section data-windrag>
  19. <div className="base-content" style={contentStyle} data-windrag>
  20. {children}
  21. </div>
  22. </section>
  23. </div>
  24. );
  25. };
  26. export default BasePage;