2025-07-18 12:03:13 +08:00
|
|
|
import React from "react";
|
|
|
|
|
import styles from "./layout.module.scss";
|
|
|
|
|
interface LayoutProps {
|
|
|
|
|
loading?: boolean;
|
|
|
|
|
children?: React.ReactNode;
|
|
|
|
|
header?: React.ReactNode;
|
|
|
|
|
footer?: React.ReactNode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const Layout: React.FC<LayoutProps> = ({ children, header, footer }) => {
|
|
|
|
|
return (
|
|
|
|
|
<div className={styles.container}>
|
|
|
|
|
{header && <header>{header}</header>}
|
|
|
|
|
<main>{children}</main>
|
|
|
|
|
{footer && <footer>{footer}</footer>}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default Layout;
|