-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix a bug when Fragment is as a slot (#6832)
* fix a bug when Fragment is as a slot * update yaml * fix ts errpr * fix astro name of md --------- Co-authored-by: wuls <[email protected]>
- Loading branch information
1 parent
57e65d2
commit 904131a
Showing
6 changed files
with
47 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro': patch | ||
--- | ||
|
||
fix a bug when Fragment is as a slot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
<Fragment set:html={Astro.slots.render('name', ['arg'])} /> |
22 changes: 22 additions & 0 deletions
22
packages/astro/test/fixtures/set-html/src/pages/children.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
import Slot from '../../components/Slot.astro'; | ||
--- | ||
|
||
<html> | ||
<body> | ||
<h3>Bug: Astro.slots.render() with arguments does not work with <Fragment> slot</h3> | ||
<p>Comment out working example and uncomment non working exmaples</p> | ||
<hr> | ||
|
||
<Slot> | ||
<Fragment slot="name"> | ||
Test | ||
</Fragment> | ||
</Slot> | ||
<Slot> | ||
<!-- <Fragment slot="name"> | ||
{arg => <p>{arg}</p>} | ||
</Fragment> --> | ||
</Slot> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters