From 31cd6496ce191f5ea2aa6ac3441bef0be7bc88b1 Mon Sep 17 00:00:00 2001 From: Angelina Gadzhieva Date: Mon, 22 Jul 2024 17:52:57 +0300 Subject: [PATCH] fix(Drawer): change disablePortal default value (#274) --- src/components/Drawer/Drawer.tsx | 2 +- src/components/Drawer/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Drawer/Drawer.tsx b/src/components/Drawer/Drawer.tsx index 30536b7..9e74cf0 100644 --- a/src/components/Drawer/Drawer.tsx +++ b/src/components/Drawer/Drawer.tsx @@ -151,7 +151,7 @@ export const Drawer: React.FC = ({ onEscape, preventScrollBody = true, hideVeil, - disablePortal, + disablePortal = true, }) => { let someItemVisible = false; React.Children.forEach(children, (child) => { diff --git a/src/components/Drawer/README.md b/src/components/Drawer/README.md index 86d8afc..9c19b45 100644 --- a/src/components/Drawer/README.md +++ b/src/components/Drawer/README.md @@ -88,7 +88,7 @@ The Drawer module consists of two primary components: `Drawer` and `DrawerItem`. | onVeilClick | Optional callback function that is called when the veil (overlay) is clicked. | `(event: React.MouseEvent) => void` | | | onEscape | Optional callback function that is called when the escape key is pressed, if the drawer is open. | `() => void` | | | hideVeil | Optional flag to hide the background darkening | `boolean` | | -| disablePortal | Optional flag to not render drawer inside `Portal` | `boolean` | | +| disablePortal | Optional flag to not render drawer inside `Portal` | `boolean` | `true` | ## CSS API