Skip to content

Commit

Permalink
fix(plasma-icons): replace opacity value when generate react component
Browse files Browse the repository at this point in the history
  • Loading branch information
Yakutoc committed Jul 3, 2024
1 parent 0b72ea3 commit b823609
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/plasma-icons/scripts/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const getSvgContent = (source: string) => (/<svg(.*?)>(.*?)<\/svg>/gm.exec(sourc

const getViewBox = (source: string) => (/viewBox="(.*?)"/gm.exec(source) || [])[1];

const removeOpacity = (source: string) => source.replace(/opacity="(.*?)"/gm, '');

const removeFillOpacity = (source: string) => source.replace(/fill-opacity="(.*?)"/gm, '');

const setFillCurrentColor = (source: string) => source.replace(/fill="(.*?)"/gm, 'fill="currentColor"');
Expand Down Expand Up @@ -36,6 +38,7 @@ export const getIconAsset = (source: string, iconName: string) => {
getSvgContent,
setFillCurrentColor,
setStrokeCurrentColor,
removeOpacity,
removeFillOpacity,
convertInlineStyleToObject,
camelizeAttributes,
Expand Down

0 comments on commit b823609

Please sign in to comment.