From 9f124f4d5084b44b3c7b31711f79f8a35953a8a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kuna?= <1282324+codecalm@users.noreply.github.com> Date: Thu, 14 Mar 2024 11:55:50 +0100 Subject: [PATCH] fix currentColor in Vue and Svelte package (#1057) --- packages/icons-solidjs/src/createSolidComponent.ts | 4 ++-- packages/icons-vue/src/createVueComponent.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/icons-solidjs/src/createSolidComponent.ts b/packages/icons-solidjs/src/createSolidComponent.ts index bd7e91468..2c64966e8 100644 --- a/packages/icons-solidjs/src/createSolidComponent.ts +++ b/packages/icons-solidjs/src/createSolidComponent.ts @@ -19,10 +19,10 @@ const createSolidComponent = ( height: () => (localProps.size != null ? localProps.size : attributes.height), ...(type === 'filled' ? { - fill: () => (localProps.color != null ? localProps.color : attributes.stroke), + fill: () => (localProps.color != null ? localProps.color : 'currentColor'), } : { - stroke: () => (localProps.color != null ? localProps.color : attributes.stroke), + stroke: () => (localProps.color != null ? localProps.color : 'currentColor'), 'stroke-width': () => localProps.stroke != null ? localProps.stroke : attributes['stroke-width'], }), diff --git a/packages/icons-vue/src/createVueComponent.ts b/packages/icons-vue/src/createVueComponent.ts index 2da04aa58..5d23dcb04 100644 --- a/packages/icons-vue/src/createVueComponent.ts +++ b/packages/icons-vue/src/createVueComponent.ts @@ -9,7 +9,7 @@ const createVueComponent = iconNamePascal: string, iconNode: IconNode, ): Icon => - ({ size, color, class: classes, stroke, ...rest }: IconProps, { attrs, slots }) => { + ({ size, color = 'currentColor', class: classes, stroke, ...rest }: IconProps, { attrs, slots }) => { return h( 'svg', {