mirror of https://github.com/sveltejs/svelte
fix: allow `let:` directives on slot elements (#10391)
fixes #10382 --------- Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>pull/10399/head
parent
b6fcc149b8
commit
97d3ec2f89
@ -0,0 +1,5 @@
|
||||
---
|
||||
"svelte": patch
|
||||
---
|
||||
|
||||
fix: allow `let:` directives on slot elements
|
@ -0,0 +1,5 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
html: `<div><div slot="x">5</div></div>`
|
||||
});
|
@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<slot name="x" foo={5} />
|
||||
</div>
|
@ -0,0 +1,9 @@
|
||||
<script>
|
||||
import Outer from './outer.svelte';
|
||||
</script>
|
||||
|
||||
<Outer>
|
||||
<div slot="x" let:foo>
|
||||
{foo}
|
||||
</div>
|
||||
</Outer>
|
@ -0,0 +1,9 @@
|
||||
<script>
|
||||
import Inner from './inner.svelte';
|
||||
</script>
|
||||
|
||||
<Inner>
|
||||
<slot name="x" slot="x" let:foo {foo}>
|
||||
{foo}
|
||||
</slot>
|
||||
</Inner>
|
Loading…
Reference in new issue