Skip to content

Instantly share code, notes, and snippets.

@ehrudxo
Last active July 3, 2016 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ehrudxo/203ec6a0f4c0a97236f801b7ef44c769 to your computer and use it in GitHub Desktop.
Save ehrudxo/203ec6a0f4c0a97236f801b7ef44c769 to your computer and use it in GitHub Desktop.
React SVG Sample
function SVGElementClass(){
function SVGClass(){
return(
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="163.000000pt" height="165.000000pt" viewBox="0 0 163.000000 165.000000" preserveAspectRatio="xMidYMid meet">
<g transform="translate(0.000000,165.000000) scale(0.100000,-0.100000)" fill="#FFFFFF" stroke="none">
<path d="M110 830 l0 -710 710 0 710 0 0 710 0 710 -710 0 -710 0 0 -710z m1360 0 l0 -650 -650 0 -650 0 0 650 0 650 650 0 650 0 0 -650z"/>
<path d="M314 832 c-30 -20 -19 -82 15 -82 29 0 46 36 32 66 -11 24 -27 30 -47 16z"/>
<path d="M1320 826 c-15 -19 -9 -56 12 -69 34 -22 66 41 36 71 -16 16 -33 15 -48 -2z"/>
<path d="M657 692 c-9 -13 20 -83 45 -109 12 -14 35 -31 50 -39 35 -18 119 -18 162 0 42 18 85 73 93 120 5 33 4 36 -20 36 -20 0 -28 -7 -37 -34 -23 -72 -102 -105 -172 -72 -34 17 -68 61 -68 90 0 16 -44 23 -53 8z"/>
</g>
</svg>
);
}
console.log(SVGClass);
ReactDOM.render(<SVGClass/>,document.getElementById("app"));
}
<a href="#" id="SVGElement">SVG</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment