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:
parent
44ea0c6d94
commit
0f2a88ba5c
2 changed files with 5 additions and 1 deletions
5
.changeset/early-pillows-deliver.md
Normal file
5
.changeset/early-pillows-deliver.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@astrojs/svelte': patch
|
||||
---
|
||||
|
||||
Allow class to be passed into Svelte islands
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue