Skip to content

Commit eee8735

Browse files
committed
chore: update on colors
1 parent 6ed960b commit eee8735

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

color-import/src/my-command.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,11 @@ const generateColorName = (theme, colorName) => {
9898
if (parts.length > 2) {
9999
state = parts[3];
100100
}
101-
if (colorName === "db-brand/on/enabled") {
102-
state = parts[2];
103-
}
101+
104102
if (color === "bg-weak") {
105103
return `${theme}/${componentName}/${on}/bg/weak-${state}`;
106-
} else if (color === "bg" || color === "contrast") {
107-
return `${theme}/${componentName}/${on}/${color}/${state}`;
108104
}
109-
return `${theme}/${componentName}/${on}/${state}`;
105+
return `${theme}/${componentName}/${on}/${color}/${state}`;
110106
}
111107

112108
if (color.includes("bg-lvl-")) {
@@ -197,7 +193,6 @@ const importThemes = async () => {
197193
const alpha = 1 - transparencyPercentage / 100;
198194

199195
const newNames = generateColorName(theme, colorName);
200-
//console.log(newNames);
201196
createSwatch(document, newNames, hexValue, alpha);
202197
}
203198
};

0 commit comments

Comments
 (0)