diff --git a/packages/svg-icons/scripts/changeColorPlugin.ts b/packages/svg-icons/scripts/changeColorPlugin.ts index d851fbc37..817602519 100644 --- a/packages/svg-icons/scripts/changeColorPlugin.ts +++ b/packages/svg-icons/scripts/changeColorPlugin.ts @@ -20,7 +20,7 @@ export const changeColorPlugin = { enter: (node: XastElement) => { for (const [nodeName, nodeValue] of Object.entries(node.attributes)) { if (colorsProps.has(nodeName)) { - let value = nodeValue as string; + let value = nodeValue; if (colors[value]) { value = colors[value]; diff --git a/packages/svg-icons/scripts/svgoConfig.ts b/packages/svg-icons/scripts/svgoConfig.ts index c82ee7537..72da81eae 100644 --- a/packages/svg-icons/scripts/svgoConfig.ts +++ b/packages/svg-icons/scripts/svgoConfig.ts @@ -11,14 +11,14 @@ import { WhiteExadecimal } from "./constants.ts"; -export const colors = { +export const colors: { [key: string]: string } = { [PrimaryIconColor]: `var(--hop-Icon-primary-icon, ${PrimaryIconColor})`, [WarningWeakIconColor]: `var(--hop-Icon-warning-icon-weak, ${WarningWeakIconColor})`, [White]: `var(--hop-Richicon-placeholder-fill, ${WhiteExadecimal})`, [WhiteExadecimal]: `var(--hop-Richicon-placeholder-fill, ${WhiteExadecimal})`, [DecorativeOption7IconColor]: `var(--hop-Richicon-placeholder-background, ${DecorativeOption7IconColor})`, [DecorativeOption7SurfaceColor]: `var(--hop-Richicon-placeholder-shadow, ${DecorativeOption7SurfaceColor})` -} satisfies Record; +}; const config: Config = { multipass: true,