ae8d925666
* 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
13 lines
331 B
Markdown
13 lines
331 B
Markdown
---
|
|
'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.
|
|
|
|
```ts
|
|
if (Astro.slots.has("default")) {
|
|
const content = await Astro.slots.render("default");
|
|
}
|
|
```
|