1import React from 'react';
2import { get, map } from 'lodash';
4const ReactSVGComponents = {
6 const { width, height, ...attrs } = p.attr;
13 xmlns={'http://www.w3.org/2000/svg'}
15 viewBox={`0 0 ${width} ${height}`}
16 preserveAspectRatio="xMidYMid meet">
17 {map(get(p, 'children', []), (child, idx) =>
18 ReactSVGComponents[child.tag](child, idx)
25 <circle {...p.attr} key={key}>
26 {map(get(p, 'children', []), (child, idx) =>
27 ReactSVGComponents[child.tag](child, idx)
34 <rect {...p.attr} key={key}>
35 {map(get(p, 'children', []), (child, idx) =>
36 ReactSVGComponents[child.tag](child, idx)
43 <path {...p.attr} key={key}>
44 {map(get(p, 'children', []), (child, idx) =>
45 ReactSVGComponents[child.tag](child, idx)
52 <g {...p.attr} key={key}>
53 {map(get(p, 'children', []), (child, idx) =>
54 ReactSVGComponents[child.tag](child, idx)
59 polygon: (p, key) => {
61 <polygon {...p.attr} key={key}>
62 {map(get(p, 'children', []), (child, idx) =>
63 ReactSVGComponents[child.tag](child, idx)
70 <line {...p.attr} key={key}>
71 {map(get(p, 'children', []), (child, idx) =>
72 ReactSVGComponents[child.tag](child, idx)
77 polyline: (p, key) => {
79 <polyline {...p.attr} key={key}>
80 {map(get(p, 'children', []), (child, idx) =>
81 ReactSVGComponents[child.tag](child, idx)
88export default ReactSVGComponents;
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list