From 7e9053ccdb2563f0fc772bcd83cbcad0b706b402 Mon Sep 17 00:00:00 2001 From: Paolo Ricciuti Date: Mon, 24 Jul 2023 13:39:07 +0200 Subject: [PATCH 1/2] Add data-* to svg attributes --- packages/svelte/elements.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/svelte/elements.d.ts b/packages/svelte/elements.d.ts index ec450284c5b5..9a7e7b3aa88e 100644 --- a/packages/svelte/elements.d.ts +++ b/packages/svelte/elements.d.ts @@ -1451,6 +1451,9 @@ export interface SVGAttributes extends AriaAttributes, DO yChannelSelector?: string | undefined | null; z?: number | string | undefined | null; zoomAndPan?: string | undefined | null; + + // allow any data- attribute + [key: `data-${string}`]: any; } export interface HTMLWebViewAttributes extends HTMLAttributes { From 9d6e323be927681ca6cd166e2548332b8ed47431 Mon Sep 17 00:00:00 2001 From: Paolo Ricciuti Date: Mon, 24 Jul 2023 13:52:24 +0200 Subject: [PATCH 2/2] Create twelve-suits-drive.md --- .changeset/twelve-suits-drive.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/twelve-suits-drive.md diff --git a/.changeset/twelve-suits-drive.md b/.changeset/twelve-suits-drive.md new file mode 100644 index 000000000000..de7390ae9507 --- /dev/null +++ b/.changeset/twelve-suits-drive.md @@ -0,0 +1,5 @@ +--- +"svelte": patch +--- + +fix: Add data-* to svg attributes