diff options
Diffstat (limited to 'packages/integrations/solid')
-rw-r--r-- | packages/integrations/solid/CHANGELOG.md | 28 | ||||
-rw-r--r-- | packages/integrations/solid/package.json | 2 |
2 files changed, 29 insertions, 1 deletions
diff --git a/packages/integrations/solid/CHANGELOG.md b/packages/integrations/solid/CHANGELOG.md index d936a6e04..b223e8a30 100644 --- a/packages/integrations/solid/CHANGELOG.md +++ b/packages/integrations/solid/CHANGELOG.md @@ -1,5 +1,33 @@ # @astrojs/solid-js +## 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.4 ### Patch Changes diff --git a/packages/integrations/solid/package.json b/packages/integrations/solid/package.json index e60677d3a..c6fe8c40a 100644 --- a/packages/integrations/solid/package.json +++ b/packages/integrations/solid/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/solid-js", - "version": "0.1.4", + "version": "0.2.0", "description": "Use Solid components within Astro", "type": "module", "types": "./dist/index.d.ts", |