1import React from 'react';
2import { get, map } from 'lodash';
4const 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)
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)
87export 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