source: frontend/node_modules/@svgr/babel-plugin-remove-jsx-attribute/lib/index.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 13 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 515 bytes
Line 
1"use strict";
2
3exports.__esModule = true;
4exports.default = void 0;
5
6const removeJSXAttribute = (api, opts) => ({
7 visitor: {
8 JSXOpeningElement(path) {
9 if (!opts.elements.includes(path.node.name.name)) return;
10 path.get('attributes').forEach(attribute => {
11 const nodeName = attribute.node.name;
12
13 if (nodeName && opts.attributes.includes(nodeName.name)) {
14 attribute.remove();
15 }
16 });
17 }
18
19 }
20});
21
22var _default = removeJSXAttribute;
23exports.default = _default;
Note: See TracBrowser for help on using the repository browser.