@@ -1,87 +0,0 @@
1−import React from 'react';
2−import { get, map } from 'lodash';
4−const ReactSVGComponents = {
6− const { width, height, ...attrs } = p.attr;
10− style={{ width: '100%', height: '100%' }}
12− xmlns={'http://www.w3.org/2000/svg'}
14− viewBox={`0 0 ${width} ${height}`}
15− preserveAspectRatio="xMidYMid meet">
16− {map(get(p, 'children', []), (child, idx) =>
17− ReactSVGComponents[child.tag](child, idx)
22− circle: (p, key) => {
24− <circle {...p.attr} key={key}>
25− {map(get(p, 'children', []), (child, idx) =>
26− ReactSVGComponents[child.tag](child, idx)
33− <rect {...p.attr} key={key}>
34− {map(get(p, 'children', []), (child, idx) =>
35− ReactSVGComponents[child.tag](child, idx)
42− <path {...p.attr} key={key}>
43− {map(get(p, 'children', []), (child, idx) =>
44− ReactSVGComponents[child.tag](child, idx)
51− <g {...p.attr} key={key}>
52− {map(get(p, 'children', []), (child, idx) =>
53− ReactSVGComponents[child.tag](child, idx)
58− polygon: (p, key) => {
60− <polygon {...p.attr} key={key}>
61− {map(get(p, 'children', []), (child, idx) =>
62− ReactSVGComponents[child.tag](child, idx)
69− <line {...p.attr} key={key}>
70− {map(get(p, 'children', []), (child, idx) =>
71− ReactSVGComponents[child.tag](child, idx)
76− polyline: (p, key) => {
78− <polyline {...p.attr} key={key}>
79− {map(get(p, 'children', []), (child, idx) =>
80− ReactSVGComponents[child.tag](child, idx)
87−export default ReactSVGComponents;