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/component-slot-named-inheri.../Nested.svelte

17 lines
254 B

<script>
import { onDestroy } from 'svelte';
let count = 0;
function increment() {
count += 1;
}
</script>
<div>
<slot {count}></slot>
<slot name="foo" {count}></slot>
<slot name="bar"></slot>
<button on:click={increment}>+1</button>
</div>