diff --git a/__snapshots__/drawer/patternhub/drawer-properties-should-match-screenshot.png b/__snapshots__/drawer/patternhub/drawer-properties-should-match-screenshot.png index 136e191207c..a44bf5a3a7f 100644 Binary files a/__snapshots__/drawer/patternhub/drawer-properties-should-match-screenshot.png and b/__snapshots__/drawer/patternhub/drawer-properties-should-match-screenshot.png differ diff --git a/__snapshots__/drawer/showcase/chromium-highContrast/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png b/__snapshots__/drawer/showcase/chromium-highContrast/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png index 2b5db72db69..559bc3f85db 100644 Binary files a/__snapshots__/drawer/showcase/chromium-highContrast/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png and b/__snapshots__/drawer/showcase/chromium-highContrast/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png differ diff --git a/__snapshots__/drawer/showcase/chromium/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png b/__snapshots__/drawer/showcase/chromium/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png index 144302b5a87..4a9d9d114b0 100644 Binary files a/__snapshots__/drawer/showcase/chromium/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png and b/__snapshots__/drawer/showcase/chromium/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png differ diff --git a/__snapshots__/drawer/showcase/firefox/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png b/__snapshots__/drawer/showcase/firefox/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png index ec1d5999f46..10dd8c79a84 100644 Binary files a/__snapshots__/drawer/showcase/firefox/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png and b/__snapshots__/drawer/showcase/firefox/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png differ diff --git a/__snapshots__/drawer/showcase/mobile-chrome/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png b/__snapshots__/drawer/showcase/mobile-chrome/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png index 527129ed500..31d680cb795 100644 Binary files a/__snapshots__/drawer/showcase/mobile-chrome/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png and b/__snapshots__/drawer/showcase/mobile-chrome/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png differ diff --git a/__snapshots__/drawer/showcase/mobile-safari/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png b/__snapshots__/drawer/showcase/mobile-safari/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png index 2f03d73381e..11d96143f17 100644 Binary files a/__snapshots__/drawer/showcase/mobile-safari/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png and b/__snapshots__/drawer/showcase/mobile-safari/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png differ diff --git a/__snapshots__/drawer/showcase/webkit/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png b/__snapshots__/drawer/showcase/webkit/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png index 9eaa5566c8a..4f190f8d686 100644 Binary files a/__snapshots__/drawer/showcase/webkit/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png and b/__snapshots__/drawer/showcase/webkit/DBDrawer-should-match-screenshot-1/DBDrawer-should-match-screenshot.png differ diff --git a/packages/components/src/components/drawer/drawer.lite.tsx b/packages/components/src/components/drawer/drawer.lite.tsx index de581aba2dc..8e57502963c 100644 --- a/packages/components/src/components/drawer/drawer.lite.tsx +++ b/packages/components/src/components/drawer/drawer.lite.tsx @@ -41,7 +41,10 @@ export default function DBDrawer(props: DBDrawerProps) { if (dialogContainerRef) { dialogContainerRef.hidden = false; } - if (props.backdrop === 'none') { + if ( + props.backdrop === 'none' || + props.variant === 'inside' + ) { ref.show(); } else { ref.showModal(); @@ -79,7 +82,8 @@ export default function DBDrawer(props: DBDrawerProps) { state.handleClose(event); }} onKeyDown={(event) => state.handleClose(event)} - data-backdrop={props.backdrop}> + data-backdrop={props.backdrop} + data-variant={props.variant}>
(
{ setOpenDrawer(undefined); diff --git a/showcases/shared/drawer.json b/showcases/shared/drawer.json index 03c7212945c..71c2a3d6184 100644 --- a/showcases/shared/drawer.json +++ b/showcases/shared/drawer.json @@ -175,5 +175,26 @@ } } ] + }, + { + "name": "Example", + "examples": [ + { + "name": "(Default) As modal", + "props": { + "variant": "modal", + "open": "open", + "onClose": "toggleDrawer(false)" + } + }, + { + "name": "Inside", + "props": { + "variant": "inside", + "open": "open", + "onClose": "toggleDrawer(false)" + } + } + ] } ] diff --git a/showcases/vue-showcase/src/components/drawer/Drawer.vue b/showcases/vue-showcase/src/components/drawer/Drawer.vue index f7669718189..338d3bbb616 100644 --- a/showcases/vue-showcase/src/components/drawer/Drawer.vue +++ b/showcases/vue-showcase/src/components/drawer/Drawer.vue @@ -25,6 +25,7 @@ const toggleDrawer = (example?: string) => { :width="exampleProps?.width" :spacing="exampleProps?.spacing" :direction="exampleProps?.direction" + :variant="exampleProps?.variant" :open="openDrawer && openDrawer === exampleName" @close="toggleDrawer(undefined)" >