mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-14 10:34:06 +02:00
Co-authored-by: Reece Browne <[email protected]> Co-authored-by: James Brunton <[email protected]>
33 lines
847 B
TypeScript
33 lines
847 B
TypeScript
import { ReactNode } from "react";
|
|
import { useBanner } from "@app/contexts/BannerContext";
|
|
import NavigationWarningModal from "@app/components/shared/NavigationWarningModal";
|
|
|
|
interface AppLayoutProps {
|
|
children: ReactNode;
|
|
}
|
|
|
|
/**
|
|
* App layout wrapper that handles banner rendering and viewport sizing
|
|
* Automatically adjusts child components to fit remaining space after banner
|
|
*/
|
|
export function AppLayout({ children }: AppLayoutProps) {
|
|
const { banner } = useBanner();
|
|
|
|
return (
|
|
<>
|
|
<style>{`
|
|
.h-screen {
|
|
height: 100% !important;
|
|
}
|
|
`}</style>
|
|
<div
|
|
style={{ height: "100vh", display: "flex", flexDirection: "column" }}
|
|
>
|
|
{banner}
|
|
<div style={{ flex: 1, minHeight: 0, height: 0 }}>{children}</div>
|
|
</div>
|
|
<NavigationWarningModal />
|
|
</>
|
|
);
|
|
}
|