Skip to content

Instantly share code, notes, and snippets.

@rogeriojlle
Last active June 10, 2019 19:13
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 rogeriojlle/2d738dc6e0e597b6670787fe62e3fa1b to your computer and use it in GitHub Desktop.
Save rogeriojlle/2d738dc6e0e597b6670787fe62e3fa1b to your computer and use it in GitHub Desktop.
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