@svgr/babel-plugin-replace-jsx-attribute-value

Replace JSX attribute value

Usage no npm install needed!

<script type="module">
  import svgrBabelPluginReplaceJsxAttributeValue from 'https://cdn.skypack.dev/@svgr/babel-plugin-replace-jsx-attribute-value';
</script>

README

@svgr/babel-plugin-replace-jsx-attribute-value

Install

npm install --save-dev @svgr/babel-plugin-replace-jsx-attribute-value

Usage

.babelrc

{
  "plugins": [
    [
      "@svgr/babel-plugin-replace-jsx-attribute-value",
      {
        "values": [
          { "value": "#000", "newValue": "#fff" },
          { "value": "blue", "newValue": "props.color", "literal": true }
        ]
      }
    ]
  ]
}

License

MIT