Allow class to be passed into Svelte islands (#5045)

* Allow class to be passed into svelte component

* Adding a changeset
This commit is contained in:
Matthew Phillips 2022-10-10 15:19:18 -04:00 committed by GitHub
parent 44ea0c6d94
commit 0f2a88ba5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/svelte': patch
---
Allow class to be passed into Svelte islands

View file

@ -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);