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

Commit

Permalink
fix(icons): update inner-path id to data attribute (#411)
Browse files Browse the repository at this point in the history
* fix(icons): update inner-path id to data attribute

* chore(icons): revert commented out plugins

* Update svgo.js
  • Loading branch information
joshblack authored Mar 13, 2019
1 parent dc489d2 commit 490b0b1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/icons/src/svgo.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,24 @@ const plugins = [
},
},
},
{
addInnerPath: {
type: 'perItem',
description: 'map the inner-path id to a corresponding data attribute',
fn(item) {
if (item.attr('id', 'inner-path')) {
item.removeAttr('id');
item.addAttr({
name: 'data-icon-path',
value: 'inner-path',
prefix: '',
local: 'data-icon-path',
});
}
return item;
},
},
},
{
inlineStyles: {
onlyMatchedOnce: false,
Expand Down

0 comments on commit 490b0b1

Please sign in to comment.