Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
fix: simplify template
Browse files Browse the repository at this point in the history
  • Loading branch information
kristw committed May 13, 2020
1 parent 0aa0ef2 commit da5afcd
Showing 1 changed file with 6 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,12 @@ export default class <%= packageLabel %> extends React.PureComponent<<%= package
const { data, height, width } = this.props;

return (
<svg style={{ backgroundColor: '#ffe459', borderRadius: 8, height, width }}>
{data.map(({ x, y }) => (
<circle
key={[x, y].join('-')}
cx={x * width}
cy={y * height}
r={Math.random() * 20}
fill="#fff"
opacity="0.5"
/>
))}
<text x={width / 2} y={height / 2} textAnchor="middle" fontWeight="bold" fontSize="36">
Hello!
</text>
</svg>
<div style={{ backgroundColor: '#ffe459', padding: 16, borderRadius: 8, height, width }}>
<h3>Hello!</h3>
<pre>
{JSON.stringify(this.props, null, 2)}
</pre>
</div>
);
}
}

0 comments on commit da5afcd

Please sign in to comment.