From 9e622570d8721ee0484df3ea83e13f7719b1ce30 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Mon, 10 Oct 2022 14:39:41 -0400 Subject: [PATCH 1/2] Allow class to be passed into svelte component --- packages/integrations/svelte/client.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/integrations/svelte/client.js b/packages/integrations/svelte/client.js index c8c252eaa96f..406500374959 100644 --- a/packages/integrations/svelte/client.js +++ b/packages/integrations/svelte/client.js @@ -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); From 07b1794916194753dec5fa841b8f7ad643e983e2 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Mon, 10 Oct 2022 14:39:57 -0400 Subject: [PATCH 2/2] Adding a changeset --- .changeset/early-pillows-deliver.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/early-pillows-deliver.md diff --git a/.changeset/early-pillows-deliver.md b/.changeset/early-pillows-deliver.md new file mode 100644 index 000000000000..745ff35f07b0 --- /dev/null +++ b/.changeset/early-pillows-deliver.md @@ -0,0 +1,5 @@ +--- +'@astrojs/svelte': patch +--- + +Allow class to be passed into Svelte islands