fix: bottomsheet responsivity
This commit is contained in:
parent
f8a6912e9e
commit
93fd7d7526
@ -142,14 +142,17 @@ const Sheet = ({
|
|||||||
}: SheetProps) => {
|
}: SheetProps) => {
|
||||||
return (
|
return (
|
||||||
<SheetRoot open={isOpen} {...props}>
|
<SheetRoot open={isOpen} {...props}>
|
||||||
<SheetContent side={position} className={cn("rounded-t-2xl", className)}>
|
<SheetContent
|
||||||
|
side={position}
|
||||||
|
className={cn("flex flex-col gap-0 rounded-t-2xl", className)}
|
||||||
|
>
|
||||||
<SheetHeader>
|
<SheetHeader>
|
||||||
{title ? <SheetTitle>{title}</SheetTitle> : null}
|
{title ? <SheetTitle>{title}</SheetTitle> : null}
|
||||||
{description ? (
|
{description ? (
|
||||||
<SheetDescription>{description}</SheetDescription>
|
<SheetDescription>{description}</SheetDescription>
|
||||||
) : null}
|
) : null}
|
||||||
</SheetHeader>
|
</SheetHeader>
|
||||||
<div className="h-[calc(100dvh-60px)] overflow-y-auto">{children}</div>
|
<div className="flex-1 overflow-y-auto">{children}</div>
|
||||||
</SheetContent>
|
</SheetContent>
|
||||||
</SheetRoot>
|
</SheetRoot>
|
||||||
);
|
);
|
||||||
|
@ -24,7 +24,7 @@ const ViewSheet = ({ modal }: Props) => {
|
|||||||
{...modal}
|
{...modal}
|
||||||
title="View Item"
|
title="View Item"
|
||||||
position="bottom"
|
position="bottom"
|
||||||
className="rounded-t-none max-h-auto h-screen"
|
className="md:rounded-t-none h-[90vh] md:h-screen"
|
||||||
>
|
>
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
<div className="min-h-[320px] flex flex-col items-center justify-center text-center">
|
<div className="min-h-[320px] flex flex-col items-center justify-center text-center">
|
||||||
@ -48,10 +48,7 @@ const ViewSheet = ({ modal }: Props) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="md:w-1/3 border-t md:border-l md:border-t-0 py-4 md:pt-0 px-4 lg:px-8 overflow-y-auto">
|
<div className="md:w-1/3 border-t md:border-l md:border-t-0 py-4 md:pt-0 px-4 lg:px-8 overflow-y-auto">
|
||||||
<Button
|
<Button className="flex pl-2 mb-6" onClick={modal.onClose}>
|
||||||
className="hidden md:flex pl-2 md:mb-6"
|
|
||||||
onClick={modal.onClose}
|
|
||||||
>
|
|
||||||
<ChevronLeft /> Back
|
<ChevronLeft /> Back
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user