Last active
June 10, 2019 19:13
-
-
Save rogeriojlle/2d738dc6e0e597b6670787fe62e3fa1b to your computer and use it in GitHub Desktop.
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
import React from 'react' | |
import { icons } from 'feather-icons' | |
function Icon ({ icon }) { | |
this.svg = icons[icon].toSvg() | |
this.blob = new Blob([this.svg], { type: 'image/svg+xml' }) | |
this.src = URL.createObjectURL(this.blob) | |
return (<img src={this.src}></img>) | |
} | |
export default Icon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment