From c12d3cffc3cf5849f8ac6b5d8f5a717f60aaada8 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 27 Feb 2024 13:28:13 +0000 Subject: [PATCH] Remove useless concept of headless drawer and fix issue with drawer observer --- packages/bbui/src/Drawer/Drawer.svelte | 20 ++++++++----------- .../common/bindings/DrawerBindableSlot.svelte | 4 ---- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/packages/bbui/src/Drawer/Drawer.svelte b/packages/bbui/src/Drawer/Drawer.svelte index ff7497b905..509522e1c5 100644 --- a/packages/bbui/src/Drawer/Drawer.svelte +++ b/packages/bbui/src/Drawer/Drawer.svelte @@ -44,7 +44,7 @@ if (get(openDrawers).length) { return } - observer.disconnect() + observer?.disconnect() observer = null } @@ -57,7 +57,6 @@ import { fade } from "svelte/transition" export let title - export let headless = false const dispatch = createEventDispatcher() const spacing = 11 @@ -156,21 +155,18 @@ {/if}
0} class:modal={$modal} transition:slide|local {style} > - {#if !headless} -
-
{title}
-
- - -
-
- {/if} +
+
{title}
+
+ + +
+
{#if !$modal && depth > 0}
diff --git a/packages/builder/src/components/common/bindings/DrawerBindableSlot.svelte b/packages/builder/src/components/common/bindings/DrawerBindableSlot.svelte index dc058ac203..4b0b5fce51 100644 --- a/packages/builder/src/components/common/bindings/DrawerBindableSlot.svelte +++ b/packages/builder/src/components/common/bindings/DrawerBindableSlot.svelte @@ -175,11 +175,7 @@ bind:this={bindingDrawer} {title} left={drawerLeft} - headless > - - Add the objects on the left to enrich your text. -