Created
July 5, 2017 18:50
-
-
Save vamsiampolu/5c80f3c63a1d4c5fa7a6776f9739a71a to your computer and use it in GitHub Desktop.
Svg Sprite loader icon2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Icon (props) { | |
// support transform in browsers that dont provide support for transforms using CSS | |
const {id, viewBox} = props | |
// using the default value for preserveAspectRatio | |
/* | |
*/ | |
return ( | |
<svg | |
transform={transform} | |
viewBox={viewBox} | |
preserveAspectRatio='xMidYMid meet' | |
style={style} | |
className={className} | |
width={width} | |
height={height} | |
> | |
<use xlinkHref={`#${id}`} /> | |
</svg> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment