From a831b7f91e10126dd80cb8a5f7963272afd8e3ec Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 30 Jul 2021 13:57:33 +0100 Subject: [PATCH] Add modal option to hide divider, and make title rendering optional --- packages/bbui/src/Modal/ModalContent.svelte | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/bbui/src/Modal/ModalContent.svelte b/packages/bbui/src/Modal/ModalContent.svelte index e6d4ab5f0f..5bf8ab599c 100644 --- a/packages/bbui/src/Modal/ModalContent.svelte +++ b/packages/bbui/src/Modal/ModalContent.svelte @@ -15,6 +15,7 @@ export let showCloseIcon = true export let onConfirm = undefined export let disabled = false + export let showDivider = true const { hide, cancel } = getContext(Context.Modal) let loading = false @@ -41,11 +42,17 @@ aria-modal="true" >
-

- {title} -

- - + {#if title} +

+ {title} +

+ {#if showDivider} + + {/if} + {/if}
@@ -96,6 +103,9 @@ .spectrum-Dialog-heading { font-family: var(--font-sans); } + .spectrum-Dialog-heading.noDivider { + margin-bottom: 12px; + } .spectrum-Dialog-buttonGroup { gap: var(--spectrum-global-dimension-static-size-200);