mirror of https://github.com/sveltejs/svelte
fix: ensure migrate correctly handles named slots (#13676)
* fix: ensure migrate correctly handles named slots * tweak * fixpull/13678/head
parent
c9d85c2d52
commit
61391c8704
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: ensure migrate correctly handles named slots
|
@ -0,0 +1,7 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import Component from './Component.svelte';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<Component>
|
||||||
|
<slot slot="msg"></slot>
|
||||||
|
</Component>
|
@ -0,0 +1,14 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import Component from './Component.svelte';
|
||||||
|
interface Props {
|
||||||
|
children?: import('svelte').Snippet;
|
||||||
|
}
|
||||||
|
|
||||||
|
let { children }: Props = $props();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<Component>
|
||||||
|
{#snippet msg()}
|
||||||
|
{@render children?.()}
|
||||||
|
{/snippet}
|
||||||
|
</Component>
|
Loading…
Reference in new issue