From c1efb4b889a6bcf42f9dceacb00ebc1fc3f6aaa8 Mon Sep 17 00:00:00 2001 From: davidroeca Date: Tue, 2 Jun 2020 16:14:57 -0500 Subject: [PATCH 1/2] Fix warnings in modal and dialog --- src/components/Dialog/Dialog.svelte | 12 ++++++------ src/components/Modal/Modal.svelte | 7 ++++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/components/Dialog/Dialog.svelte b/src/components/Dialog/Dialog.svelte index 2377dd5d..e9d00ad3 100644 --- a/src/components/Dialog/Dialog.svelte +++ b/src/components/Dialog/Dialog.svelte @@ -2,7 +2,7 @@ import { createEventDispatcher, onDestroy, onMount, tick } from 'svelte' import Icon from '../Icon.svelte' import { chooseAnimation, isEnterKey, isEscKey } from '../../utils' - + /** Show a header on the dialog with this text * @svelte-prop {String} [message] * */ @@ -44,7 +44,7 @@ * @svelte-prop {Boolean} [hasInput=false] * */ export let hasInput = false - + export let prompt = null /** Show the cancel button. True for confirm() @@ -84,10 +84,10 @@ // export let showClose = true let resolve - export let promise = new Promise((fulfil) => (resolve = fulfil)) - + export const promise = new Promise((fulfil) => (resolve = fulfil)) + // TODO: programmatic subcomponents - export let subComponent = null + // export let subComponent = null export let appendToBody = true let modal @@ -274,4 +274,4 @@ -{/if} \ No newline at end of file +{/if} diff --git a/src/components/Modal/Modal.svelte b/src/components/Modal/Modal.svelte index ff461cc9..3e6be4ca 100644 --- a/src/components/Modal/Modal.svelte +++ b/src/components/Modal/Modal.svelte @@ -7,7 +7,8 @@ export let animProps = { start: 1.2 } export let size = '' export let showClose = true - export let subComponent = null + // TODO: programmatic subcomponents + // export let subComponent = null export let onBody = true let modal @@ -21,7 +22,7 @@ } onMount(() => { - + }) function close() { @@ -48,4 +49,4 @@ {/if} -{/if} \ No newline at end of file +{/if} From be2e95b1f4aaf0c264bb4bec7947f25a6a56a899 Mon Sep 17 00:00:00 2001 From: davidroeca Date: Tue, 2 Jun 2020 17:31:18 -0500 Subject: [PATCH 2/2] change ariaCloseLabel to {} syntax --- src/components/Message.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Message.svelte b/src/components/Message.svelte index a6c3051b..afba2f5d 100644 --- a/src/components/Message.svelte +++ b/src/components/Message.svelte @@ -69,7 +69,7 @@

{title}

{/if} {#if showClose} -