Skip to content

Commit

Permalink
Add test tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcconechy committed Sep 19, 2023
1 parent f35f9c7 commit 49eb262
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/node/build-icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ function optimizeSVGs(src) {
const isEmpty = filepath.indexOf(`icons${path.sep}empty`) > 1;

if (hasStroke && !isEmpty) {
svgFile = dataOptimized.data.replace(`xmlns="http://www.w3.org/2000/svg"`, `xmlns="http://www.w3.org/2000/svg" style="color: #28282A; fill: transparent;"`);
svgFile = dataOptimized.data.replace(`xmlns="http://www.w3.org/2000/svg"`, `xmlns="http://www.w3.org/2000/svg" style="color: #28282A; fill: transparent" data-test="true"`);
svgFile = svgFile.replaceAll('stroke="currentColor"', 'stroke="currentColor" fill="transparent"');
} else if (!isEmpty) {
svgFile = dataOptimized.data.replace(`xmlns="http://www.w3.org/2000/svg"`, `xmlns="http://www.w3.org/2000/svg" style="color: transparent; fill: #28282A;"`);
svgFile = dataOptimized.data.replace(`xmlns="http://www.w3.org/2000/svg"`, `xmlns="http://www.w3.org/2000/svg" style="color: transparent; fill: #28282A;" data-test="true"`);
}
console.log(`Optimizing ${filepath}`);

Expand Down

0 comments on commit 49eb262

Please sign in to comment.