summaryrefslogtreecommitdiff
path: root/packages/integrations/preact
diff options
context:
space:
mode:
authorGravatar github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> 2022-06-24 12:55:36 -0500
committerGravatar GitHub <noreply@github.com> 2022-06-24 12:55:36 -0500
commit6a6047483bccbedcf3fea890ad588e53f0800b49 (patch)
tree27e2786719477a4a32b6c659a2556247de1aa92d /packages/integrations/preact
parent3e6ed5d1bc80b55fed1e1b01a4c8d9398d5cd543 (diff)
downloadastro-6a6047483bccbedcf3fea890ad588e53f0800b49.tar.gz
astro-6a6047483bccbedcf3fea890ad588e53f0800b49.tar.zst
astro-6a6047483bccbedcf3fea890ad588e53f0800b49.zip
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'packages/integrations/preact')
-rw-r--r--packages/integrations/preact/CHANGELOG.md28
-rw-r--r--packages/integrations/preact/package.json2
2 files changed, 29 insertions, 1 deletions
diff --git a/packages/integrations/preact/CHANGELOG.md b/packages/integrations/preact/CHANGELOG.md
index 07fbf0ea0..fa02e8590 100644
--- a/packages/integrations/preact/CHANGELOG.md
+++ b/packages/integrations/preact/CHANGELOG.md
@@ -1,5 +1,33 @@
# @astrojs/preact
+## 0.2.0
+
+### Minor Changes
+
+- [#3652](https://github.com/withastro/astro/pull/3652) [`7373d61c`](https://github.com/withastro/astro/commit/7373d61cdcaedd64bf5fd60521b157cfa4343558) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Add support for passing named slots from `.astro` => framework components.
+
+ Each `slot` is be passed as a top-level prop. For example:
+
+ ```jsx
+ // From .astro
+ <Component>
+ <h2 slot="title">Hello world!</h2>
+ <h2 slot="slot-with-dash">Dash</h2>
+ <div>Default</div>
+ </Component>;
+
+ // For .jsx
+ export default function Component({ title, slotWithDash, children }) {
+ return (
+ <>
+ <div id="title">{title}</div>
+ <div id="slot-with-dash">{slotWithDash}</div>
+ <div id="main">{children}</div>
+ </>
+ );
+ }
+ ```
+
## 0.1.3
### Patch Changes
diff --git a/packages/integrations/preact/package.json b/packages/integrations/preact/package.json
index 72a6174cc..7229e6b2e 100644
--- a/packages/integrations/preact/package.json
+++ b/packages/integrations/preact/package.json
@@ -1,7 +1,7 @@
{
"name": "@astrojs/preact",
"description": "Use Preact components within Astro",
- "version": "0.1.3",
+ "version": "0.2.0",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",