Skip to content
This repository has been archived by the owner on Jul 12, 2019. It is now read-only.

Commit

Permalink
feat(icons): add app-switcher.svg (#347)
Browse files Browse the repository at this point in the history
* added app-switcher.svg

created a 20x20 app-switcher.svg that will look great @ 2x and not awful @1x.

* correct for the ignored no fill rect

* fix(icons): support all icon sizes in optimize step
  • Loading branch information
chrisconnors-ibm authored and joshblack committed Feb 12, 2019
1 parent 24530fe commit 5000ab7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
1 change: 1 addition & 0 deletions packages/icons/src/svg/20/app-switcher.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 9 additions & 13 deletions packages/icons/src/svgo.js
Expand Up @@ -31,20 +31,16 @@ const plugins = [
}
}

if (
item.isElem('rect') &&
item.attr('width', '32') &&
item.attr('height', '32')
) {
return !item;
}
const sizes = ['16', '20', '24', '32'];

if (
item.isElem('rect') &&
item.attr('width', '16') &&
item.attr('height', '16')
) {
return !item;
for (const size of sizes) {
if (
item.isElem('rect') &&
item.attr('width', size) &&
item.attr('height', size)
) {
return !item;
}
}

return item;
Expand Down

0 comments on commit 5000ab7

Please sign in to comment.