You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/bitmask-overflow-slot-6/main.svelte

23 lines
475 B

<script>
import Slotted from './Slotted.svelte';
let lotsOfNumbers = Array.from({length: 50}, () => 1);
let [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, aa, ab, ac, ad, ae, af, ag, ah] = lotsOfNumbers;
let last = 1;
function toggle () {
last = 2;
}
</script>
<Slotted>
<button slot="target">
Toggle inside {last}
</button>
<div slot="content">
Open
</div>
</Slotted>
<button on:click={toggle}>Toggle outside</button>