Skip to content

Commit

Permalink
feat: update code with Pull request comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Franck Gaudin committed May 14, 2024
1 parent 73037f3 commit dbe2eb6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/svg-icons/scripts/changeColorPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
4 changes: 2 additions & 2 deletions packages/svg-icons/scripts/svgoConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string>;
};

const config: Config = {
multipass: true,
Expand Down

0 comments on commit dbe2eb6

Please sign in to comment.