Skip to content

Instantly share code, notes, and snippets.

@vamsiampolu
Created July 5, 2017 18:50
Show Gist options
  • Save vamsiampolu/5c80f3c63a1d4c5fa7a6776f9739a71a to your computer and use it in GitHub Desktop.
Save vamsiampolu/5c80f3c63a1d4c5fa7a6776f9739a71a to your computer and use it in GitHub Desktop.
Svg Sprite loader icon2
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