Here's your demo in 45 lines of SVG and CSS: https://codepen.io/paulirish/pen/gbOZXJp
SVG a11y standards are pretty undeveloped however which is disappointing
Also, the instructions for converting svg to react component work sometimes. It won't work if your svg has any style attributes for example. React also warns on some valid svg attributes, such as this one.
<rect x="11" y="11" width="8" height="8" stroke="green" clip-path="circle() view-box" />
I've spent at least a day cleaning up after devs who just dropped inline SVG content into react components without checking whether it works. If you actually had a reliable way of embedding SVG in JSX in such a way that it worked with react, I might have use for it on occasion.The given code example is missing a right angle brace on the `<svg` line.