Skip to content

Instantly share code, notes, and snippets.

@JakeCoxon
Created January 1, 2017 15:02
Show Gist options
  • Save JakeCoxon/873008ee1d67ffabbdb1695817cf3071 to your computer and use it in GitHub Desktop.
Save JakeCoxon/873008ee1d67ffabbdb1695817cf3071 to your computer and use it in GitHub Desktop.
const show = (children) =>
<svg style={{border:'1px solid #ccc', height:500}}>{children}</svg>
const circles = _.range(20).map(x => {
return <circle
cx={25 + x * 25}
cy={x % 2 == 0 ? 45 : 20}
fill="black"
r={10} />
});
const squares = _.range(20).map(x => {
return <rect
x={x * 25}
y={200}
width={20}
height={20}
fill="black"/>
});
show(circles.concat(squares));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment