Fix formatting

pull/6962/head
Nayan Gautam 5 years ago
parent 137ae2d81b
commit 44e8285ef2

@ -10,6 +10,6 @@ export function clickOutside(node) {
return {
destroy() {
document.removeEventListener("click", handleClick, true);
},
}
};
};
}

@ -4,6 +4,13 @@
let showModal = true;
</script>
<button on:click={() => (showModal = true)}>Show Modal</button>
{#if showModal}
<div class="box" on:outclick={() => (showModal = false)}>
Click outside me!
</div>
{/if}
<style>
.box {
--width: 100px;
@ -20,10 +27,3 @@
font-weight: bold;
}
</style>
<button on:click={() => (showModal = true)}>Show Modal</button>
{#if showModal}
<div class="box" on:outclick={() => (showModal = false)}>
Click outside me!
</div>
{/if}

@ -4,6 +4,6 @@ export function clickOutside(node) {
return {
destroy() {
// ...cleanup goes here
},
}
};
};
}

@ -4,6 +4,13 @@
let showModal = true;
</script>
<button on:click={() => (showModal = true)}>Show Modal</button>
{#if showModal}
<div class="box" use:clickOutside on:outclick={() => (showModal = false)}>
Click outside me!
</div>
{/if}
<style>
.box {
--width: 100px;
@ -20,10 +27,3 @@
font-weight: bold;
}
</style>
<button on:click={() => (showModal = true)}>Show Modal</button>
{#if showModal}
<div class="box" use:clickOutside on:outclick={() => (showModal = false)}>
Click outside me!
</div>
{/if}

@ -10,6 +10,6 @@ export function clickOutside(node) {
return {
destroy() {
document.removeEventListener("click", handleClick, true);
},
}
};
};
}

Loading…
Cancel
Save