Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Svelte compiler warnings #57

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/components/Dialog/Dialog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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]
* */
Expand Down Expand Up @@ -44,7 +44,7 @@
* @svelte-prop {Boolean} [hasInput=false]
* */
export let hasInput = false

export let prompt = null

/** Show the cancel button. True for <code>confirm()</code>
Expand Down Expand Up @@ -84,6 +84,7 @@

// export let showClose = true
let resolve

// export let promise = new Promise((fulfil) => (resolve = fulfil))

// TODO: programmatic subcomponents
Expand Down Expand Up @@ -274,4 +275,4 @@
</footer>
</div>
</div>
{/if}
{/if}
6 changes: 5 additions & 1 deletion src/components/Modal/Modal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
export let animProps = { start: 1.2 }
export let size = ''
export let showClose = true

// TODO: programmatic subcomponents
// export let subComponent = null
export let onBody = true

let modal
Expand All @@ -20,7 +23,7 @@
}

onMount(() => {

})

function close() {
Expand All @@ -41,6 +44,7 @@
<div class="modal-content" transition:_animation|local={animProps}> <!-- transition:_animation|local -->
<slot />
</div>

{#if showClose}
<button class="modal-close is-large" aria-label="close" on:click={close}></button>
{/if}
Expand Down