Skip to content

Instantly share code, notes, and snippets.

@xavxyz
Created January 10, 2018 10:24
Show Gist options
  • Select an option

  • Save xavxyz/7fe1f7b8a5df9183118cd340ac8065a1 to your computer and use it in GitHub Desktop.

Select an option

Save xavxyz/7fe1f7b8a5df9183118cd340ac8065a1 to your computer and use it in GitHub Desktop.
[/* list of (rectangle + gradient) properties*/].map(
({ rectangle, gradient }) =>
<FancyRectangle
x={rectangle.x}
y={rectangle.y}
width={60}
height={60}
gradientStart={gradient.start}
gradientEnd={gradient.end}
/>
);
const FancyRectangle = props => (
/*
render a <rect /> &
render a <linearGradient />
*/
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment