mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-06 21:44:13 +03:00
Use a column layout for MobilePageContent in PlatformAwareSheet
This is so the header is outside the scrolling area and the content can grow/scroll independently. This now matches the way it's done in classification
This commit is contained in:
parent
ab43a33d19
commit
4ab9fd114f
@ -20,6 +20,7 @@ import {
|
|||||||
SheetTitle,
|
SheetTitle,
|
||||||
SheetTrigger,
|
SheetTrigger,
|
||||||
} from "@/components/ui/sheet";
|
} from "@/components/ui/sheet";
|
||||||
|
import { cn } from "@/lib/utils";
|
||||||
import { isMobile } from "react-device-detect";
|
import { isMobile } from "react-device-detect";
|
||||||
|
|
||||||
type PlatformAwareDialogProps = {
|
type PlatformAwareDialogProps = {
|
||||||
@ -86,14 +87,16 @@ export function PlatformAwareSheet({
|
|||||||
{trigger}
|
{trigger}
|
||||||
</MobilePageTrigger>
|
</MobilePageTrigger>
|
||||||
<MobilePagePortal>
|
<MobilePagePortal>
|
||||||
<MobilePageContent className="h-full overflow-hidden">
|
<MobilePageContent className="flex h-full flex-col">
|
||||||
<MobilePageHeader
|
<MobilePageHeader
|
||||||
className="mx-2"
|
className="mx-2"
|
||||||
onClose={() => onOpenChange(false)}
|
onClose={() => onOpenChange(false)}
|
||||||
>
|
>
|
||||||
<MobilePageTitle>{title}</MobilePageTitle>
|
<MobilePageTitle>{title}</MobilePageTitle>
|
||||||
</MobilePageHeader>
|
</MobilePageHeader>
|
||||||
<div className={contentClassName}>{content}</div>
|
<div className={cn("flex-1 overflow-y-auto", contentClassName)}>
|
||||||
|
{content}
|
||||||
|
</div>
|
||||||
</MobilePageContent>
|
</MobilePageContent>
|
||||||
</MobilePagePortal>
|
</MobilePagePortal>
|
||||||
</MobilePage>
|
</MobilePage>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user