Skip to content

Commit

Permalink
Allow class to be passed into Svelte islands (#5045)
Browse files Browse the repository at this point in the history
* Allow class to be passed into svelte component

* Adding a changeset
  • Loading branch information
matthewp authored Oct 10, 2022
1 parent 44ea0c6 commit 0f2a88b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/early-pillows-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/svelte': patch
---

Allow class to be passed into Svelte islands
1 change: 0 additions & 1 deletion packages/integrations/svelte/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const noop = () => {};
export default (target) => {
return (Component, props, slotted, { client }) => {
if (!target.hasAttribute('ssr')) return;
delete props['class'];
const slots = {};
for (const [key, value] of Object.entries(slotted)) {
slots[key] = createSlotDefinition(key, value);
Expand Down

0 comments on commit 0f2a88b

Please sign in to comment.