From 9603b079ba5d479e9bc6b9fc2a05328add5782e7 Mon Sep 17 00:00:00 2001 From: Vytenis Kuciauskas Date: Sat, 26 Jun 2021 21:44:43 +0300 Subject: [PATCH] replace 1em to 24 --- .svgrrc.js | 9 +++++++++ package.json | 1 + 2 files changed, 10 insertions(+) diff --git a/.svgrrc.js b/.svgrrc.js index 489b217..a0dc549 100644 --- a/.svgrrc.js +++ b/.svgrrc.js @@ -14,6 +14,15 @@ module.exports = { attributes: ['xmlns'], }, ], + // default is 1em - replace it to 24 + [ + "@svgr/babel-plugin-replace-jsx-attribute-value", + { + "values": [ + { "value": "1em", "newValue": 24 }, + ] + } + ] ], }, }, diff --git a/package.json b/package.json index 79577ab..86d91a7 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "devDependencies": { "@microsoft/api-extractor": "^7.16.1", "@svgr/babel-plugin-remove-jsx-attribute": "^5.4.0", + "@svgr/babel-plugin-replace-jsx-attribute-value": "^5.0.1", "@svgr/cli": "^5.5.0", "@types/react": "^17.0.11", "react-native": "^0.64.2",