astro/.changeset/clean-bottles-drive.md
Nate Moore ae8d925666
Improve Astro.slots API (#2695)
* feat: update Astro.slots API

* fix: migrate Markdown to public `Astro.slots.render` API

* chore: update internal AstroGlobal types

* chore: add changeset

* Update clean-bottles-drive.md

* refactor(test): update slot tests to new syntax
2022-03-09 18:09:48 -06:00

331 B

astro
patch

Update Astro.slots API with new public has and render methods.

This is a backwards-compatible change—Astro.slots.default will still be true if the component has been passed a default slot.

if (Astro.slots.has("default")) {
  const content = await Astro.slots.render("default");
}