From bfbce754d98280c99dcc9134ed0d2065dbb7f34b Mon Sep 17 00:00:00 2001 From: p-sw Date: Sun, 4 Aug 2024 15:22:41 +0900 Subject: [PATCH] feat: add maxSize prop on DrawerContent --- packages/react/components/Drawer.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/react/components/Drawer.tsx b/packages/react/components/Drawer.tsx index 2bcbade..50dec43 100644 --- a/packages/react/components/Drawer.tsx +++ b/packages/react/components/Drawer.tsx @@ -163,6 +163,12 @@ const [drawerContentVariant, resolveDrawerContentVariantProps] = vcn({ left: "left-0 inset-y-0 h-screen rounded-l-lg border-r-2", right: "right-0 inset-y-0 h-screen rounded-r-lg border-l-2", }, + maxSize: { + sm: "[&.left-0]:max-w-sm [&.right-0]:max-w-sm", + md: "[&.left-0]:max-w-md [&.right-0]:max-w-md", + lg: "[&.left-0]:max-w-lg [&.right-0]:max-w-lg", + xl: "[&.left-0]:max-w-xl [&.right-0]:max-w-xl", + }, opened: { true: "", false: @@ -172,6 +178,7 @@ const [drawerContentVariant, resolveDrawerContentVariantProps] = vcn({ defaults: { position: "left", opened: false, + maxSize: "sm", }, });