diff --git a/packages/bbui/src/Drawer/Drawer.svelte b/packages/bbui/src/Drawer/Drawer.svelte index 757f86b471..9bd4eb5848 100644 --- a/packages/bbui/src/Drawer/Drawer.svelte +++ b/packages/bbui/src/Drawer/Drawer.svelte @@ -61,6 +61,7 @@ import Button from "../Button/Button.svelte" import { setContext, createEventDispatcher, onDestroy } from "svelte" import { generate } from "shortid" + import { Icon, ActionButton } from "@budibase/bbui" export let title export let forceModal = false @@ -184,10 +185,24 @@ {style} >
-
{title || "Bindings"}
+ {#if $$slots.title} + + {:else} +
{title || "Bindings"}
+ {/if}
+ {#if $resizable} + modal.set(!$modal)} + > + + + {/if}
@@ -274,4 +289,8 @@ align-items: center; gap: var(--spacing-m); } + .buttons :global(.icon) { + width: 16px; + display: flex; + } diff --git a/packages/builder/src/components/common/bindings/BindingPanel.svelte b/packages/builder/src/components/common/bindings/BindingPanel.svelte index 232aabc21c..bba3832efd 100644 --- a/packages/builder/src/components/common/bindings/BindingPanel.svelte +++ b/packages/builder/src/components/common/bindings/BindingPanel.svelte @@ -30,7 +30,6 @@ import formatHighlight from "json-format-highlight" import { capitalise } from "helpers" import { Utils } from "@budibase/frontend-core" - import { get } from "svelte/store" const dispatch = createEventDispatcher() @@ -46,7 +45,6 @@ export let autofocusEditor = false export let placeholder = null - const drawerContext = getContext("drawer") const Modes = { Text: "Text", JavaScript: "JavaScript", @@ -66,10 +64,8 @@ let insertAtPos let targetMode = null let expressionResult - let drawerIsModal let evaluating = false - $: drawerContext?.modal.subscribe(val => (drawerIsModal = val)) $: editorModeOptions = getModeOptions(allowHBS, allowJS) $: sidePanelOptions = getSidePanelOptions( bindings, @@ -239,18 +235,22 @@
-
- {#each editorModeOptions as editorMode} - changeMode(editorMode)} - > - {capitalise(editorMode)} - - {/each} -
+ {#if $$slots.tabs} + + {:else} +
+ {#each editorModeOptions as editorMode} + changeMode(editorMode)} + > + {capitalise(editorMode)} + + {/each} +
+ {/if}
{#each sidePanelOptions as panel} {/each} - {#if drawerContext && get(drawerContext.resizable)} - drawerContext.modal.set(!drawerIsModal)} - > - - - {/if}
diff --git a/packages/builder/src/components/common/bindings/SnippetDrawer.svelte b/packages/builder/src/components/common/bindings/SnippetDrawer.svelte index 7e959053fa..05c2b9b000 100644 --- a/packages/builder/src/components/common/bindings/SnippetDrawer.svelte +++ b/packages/builder/src/components/common/bindings/SnippetDrawer.svelte @@ -1,5 +1,5 @@