diff --git a/packages/web-react/src/components/Drawer/demo/DrawerDefault.tsx b/packages/web-react/src/components/Drawer/demo/DrawerDefault.tsx index c6d0002822..adb3d7bb1a 100644 --- a/packages/web-react/src/components/Drawer/demo/DrawerDefault.tsx +++ b/packages/web-react/src/components/Drawer/demo/DrawerDefault.tsx @@ -1,5 +1,5 @@ import React, { ChangeEvent, useState } from 'react'; -import { Button, Radio } from '../..'; +import { Button, Checkbox, Radio, Stack, TextArea } from '../..'; import { AlignmentX } from '../../../constants'; import { DrawerAlignmentXType } from '../../../types'; import Drawer from '../Drawer'; @@ -8,6 +8,9 @@ import DrawerPanel from '../DrawerPanel'; const DrawerDefault = () => { const [isDrawerOpen, setDrawerOpen] = useState(false); + const [isClosableOnBackdropClick, setIsClosableOnBackdropClick] = useState(true); + const [isClosableOnEscapeKey, setIsClosableOnEscapeKey] = useState(true); + const [content, setContent] = useState('This is a Drawer content.'); const [drawerAlign, setDrawerAlign] = useState(AlignmentX.RIGHT); const handleOpenDrawer = () => setDrawerOpen(true); @@ -43,13 +46,47 @@ const DrawerDefault = () => { onChange={handleDrawerAlignChange} /> + +
+ + setIsClosableOnEscapeKey(!isClosableOnEscapeKey)} + /> + setIsClosableOnBackdropClick(!isClosableOnBackdropClick)} + /> +