Created
September 9, 2021 09:56
-
-
Save TrySound/7aa1aa3348cbb9ea18386294760ee5f9 to your computer and use it in GitHub Desktop.
Fill paths with color
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const renameMaskType = { | |
name: 'fillPaths', | |
type: 'visitor', | |
fn: () => { | |
return { | |
element: { | |
enter: node => { | |
if (node.name === 'path') { | |
node.attributes.fill = '#fff'; | |
} | |
} | |
} | |
} | |
} | |
} | |
module.exports = { | |
plugins: [ | |
'preset-default', | |
renameMaskType | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment