From f8f6bfea5a7f783636c4d0ce9ba7291ce0ea0a97 Mon Sep 17 00:00:00 2001 From: Omar Shehab <31727466+omarshehab221@users.noreply.github.com> Date: Mon, 23 Dec 2024 14:11:19 +0200 Subject: [PATCH] chore(drawer): export drawer children props (#4310) * export Drawer children props * Fix eslint * fix: add changeset for drawer props export * fix: remove useDisclosure export for `@nextui-org/react` not to fail * remove useDisclosureProps * Import props as types --- .changeset/forty-ducks-brake.md | 5 +++++ packages/components/drawer/src/index.ts | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .changeset/forty-ducks-brake.md diff --git a/.changeset/forty-ducks-brake.md b/.changeset/forty-ducks-brake.md new file mode 100644 index 0000000000..b883532157 --- /dev/null +++ b/.changeset/forty-ducks-brake.md @@ -0,0 +1,5 @@ +--- +"@nextui-org/drawer": patch +--- + +Export useDisclosure and Drawer children props from `@nextui-org/drawer` diff --git a/packages/components/drawer/src/index.ts b/packages/components/drawer/src/index.ts index d171778a5b..51f10ef054 100644 --- a/packages/components/drawer/src/index.ts +++ b/packages/components/drawer/src/index.ts @@ -1,9 +1,24 @@ -import {ModalHeader, ModalBody, ModalFooter, ModalContent} from "@nextui-org/modal"; +import { + ModalHeader, + ModalBody, + ModalFooter, + ModalContent, + type ModalContentProps, + type ModalHeaderProps, + type ModalBodyProps, + type ModalFooterProps, +} from "@nextui-org/modal"; import Drawer from "./drawer"; // export types export type {DrawerProps} from "./drawer"; +export type { + ModalContentProps as DrawerContentProps, + ModalHeaderProps as DrawerHeaderProps, + ModalBodyProps as DrawerBodyProps, + ModalFooterProps as DrawerFooterProps, +}; // export hooks export {useDrawer} from "./use-drawer";