2024-03-20 13:52:58 +01:00
|
|
|
//info: Basic window component to display content and buttons of a page, inclduing header and footer
|
|
|
|
//content to insert is placed in the content prop, and buttons in the buttons prop
|
2024-03-07 11:48:34 +01:00
|
|
|
import Header from "./Header";
|
|
|
|
import Footer from "./Footer";
|
2024-03-07 10:05:45 +01:00
|
|
|
|
2024-03-20 13:52:58 +01:00
|
|
|
/**
|
|
|
|
* Renders a basic window component with a header, content, and footer.
|
|
|
|
*
|
|
|
|
* @param {Object} props - The component props.
|
|
|
|
* @param {React.ReactNode} props.content - The content to be rendered in the window.
|
|
|
|
* @param {React.ReactNode} props.buttons - The buttons to be rendered in the footer.
|
|
|
|
* @returns {JSX.Element} The rendered basic window component.
|
|
|
|
*/
|
2024-03-07 11:48:34 +01:00
|
|
|
function BasicWindow({
|
|
|
|
content,
|
|
|
|
buttons,
|
|
|
|
}: {
|
|
|
|
content: React.ReactNode;
|
|
|
|
buttons: React.ReactNode;
|
|
|
|
}): JSX.Element {
|
2024-03-07 10:05:45 +01:00
|
|
|
return (
|
|
|
|
<div className="font-sans flex flex-col h-screen bg-white border-2 border-black overflow-auto pt-[110px]">
|
2024-03-18 17:20:29 +01:00
|
|
|
<Header />
|
2024-03-07 11:48:34 +01:00
|
|
|
<div className="flex flex-col items-center flex-grow">{content}</div>
|
|
|
|
<Footer>{buttons}</Footer>
|
2024-03-07 10:05:45 +01:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2024-03-07 11:48:34 +01:00
|
|
|
export default BasicWindow;
|