This commit is contained in:
rosetta
2026-01-30 05:01:05 +02:00
commit 83f38dc63f
327 changed files with 18725 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
import { Box, Flex, ScrollArea } from "@mantine/core";
import { useEffect, useState } from "react";
interface InternalScreenProps {
children: any;
}
export function InternalScreen(props : InternalScreenProps) {
const [scrollAreaHeight, setScrollAreaHeight] = useState(window.innerHeight);
useEffect(() => {
const handleResize = () => setScrollAreaHeight(window.innerHeight);
window.addEventListener("resize", handleResize);
handleResize();
return () => window.removeEventListener("resize", handleResize);
}, []);
return (
<Flex align={'center'} justify={'center'}>
<Box maw={650} w={'100%'}>
<ScrollArea
type="hover"
offsetScrollbars={"y"}
scrollHideDelay={1500}
scrollbarSize={7}
w={'100%'}
h={scrollAreaHeight - 100} // Adjust height with an offset
>
<Box pb={'lg'} pl={'md'} pt={'md'} pr={'sm'}>
{props.children}
</Box>
</ScrollArea>
</Box>
</Flex>
);
}