Development #24
@@ -9,7 +9,7 @@ import {
|
|||||||
import { useIsMobile } from "@/hooks/use-is-mobile";
|
import { useIsMobile } from "@/hooks/use-is-mobile";
|
||||||
import Drawer from "./drawer";
|
import Drawer from "./drawer";
|
||||||
import Modal from "./modal";
|
import Modal from "./modal";
|
||||||
import { ScrollArea, Flex, Loader } from "@mantine/core";
|
import { Box, Flex, Loader } from "@mantine/core";
|
||||||
|
|
||||||
interface SheetProps extends PropsWithChildren {
|
interface SheetProps extends PropsWithChildren {
|
||||||
title?: string;
|
title?: string;
|
||||||
@@ -60,14 +60,19 @@ const Sheet: React.FC<SheetProps> = ({ title, children, opened, onChange }) => {
|
|||||||
<Loader size='lg' />
|
<Loader size='lg' />
|
||||||
</Flex>
|
</Flex>
|
||||||
}>
|
}>
|
||||||
<ScrollArea.Autosize
|
{/* Native overflow, not ScrollArea: vaul's drag-vs-scroll detection
|
||||||
style={{ flex: 1, maxHeight: '75dvh' }}
|
only recognizes natively scrollable elements. */}
|
||||||
scrollbarSize={8}
|
<Box
|
||||||
scrollbars="y"
|
style={{
|
||||||
type="scroll"
|
flex: 1,
|
||||||
|
maxHeight: "75dvh",
|
||||||
|
overflowY: "auto",
|
||||||
|
overscrollBehavior: "contain",
|
||||||
|
WebkitOverflowScrolling: "touch",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</ScrollArea.Autosize>
|
</Box>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</SheetComponent>
|
</SheetComponent>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user