feat: view artwork full screen

This commit is contained in:
2024-01-10 16:26:14 +00:00
parent 2fa435a9ba
commit 05904267c5
2 changed files with 14 additions and 7 deletions
+4 -2
View File
@@ -128,6 +128,7 @@ type SheetProps = React.ComponentProps<typeof SheetRoot> & {
title?: string;
description?: string;
position?: SheetContentProps["side"];
className?: string;
};
const Sheet = ({
@@ -136,18 +137,19 @@ const Sheet = ({
description,
children,
position,
className,
...props
}: SheetProps) => {
return (
<SheetRoot open={isOpen} {...props}>
<SheetContent side={position} className="rounded-t-2xl">
<SheetContent side={position} className={cn("rounded-t-2xl", className)}>
<SheetHeader>
{title ? <SheetTitle>{title}</SheetTitle> : null}
{description ? (
<SheetDescription>{description}</SheetDescription>
) : null}
</SheetHeader>
<div className="max-h-[90vh] overflow-y-auto">{children}</div>
<div className="h-[calc(100vh-60px)] overflow-y-auto">{children}</div>
</SheetContent>
</SheetRoot>
);