[READ-ONLY] Mirror of https://github.com/probablykasper/modal-svelte.
svelte
0

Configure Feed

Select the types of activity you want to include in your feed.

Rename boolean props

Kasper (Dec 11, 2022, 4:31 PM +0100) e86bf035 42ecd68c

+5 -5
+5 -5
src/lib/Modal.svelte
··· 11 11 import { cubicOut } from 'svelte/easing' 12 12 13 13 export let onCancel: () => void 14 - export let disableEscapeHandling = false 14 + export let noEscapeHandling = false 15 15 export let form: (() => void) | undefined = undefined 16 - export let closeIcon = true 16 + export let noCloseIcon = true 17 17 $: tag = form === undefined ? 'div' : 'form' 18 18 export let title: string | null = null 19 19 ··· 70 70 focusElements[0].focus() 71 71 e.preventDefault() 72 72 } 73 - } else if (checkShortcut(e, 'Escape') && !disableEscapeHandling) { 73 + } else if (checkShortcut(e, 'Escape') && !noEscapeHandling) { 74 74 onCancel() 75 75 } 76 76 } ··· 109 109 on:keydown|self={boxKeydown} 110 110 transition:scale={{ duration: 200, start: 0.9, opacity: 0, easing: cubicOut }} 111 111 > 112 - {#if closeIcon} 112 + {#if noCloseIcon} 113 113 <!-- svelte-ignore a11y-click-events-have-key-events --> 114 114 <svg 115 115 on:click={() => onCancel()} ··· 154 154 .backdrop 155 155 background-color: hsla(0, 0%, 0%, 0.5) 156 156 .box 157 - background-color: hsl(220, 18%, 11%) 157 + background-color: var(--modal-bg, hsl(220, 18%, 11%)) 158 158 position: relative 159 159 border: 1px solid hsla(0, 0%, 100%, 0.15) 160 160 max-width: 100%