react-feather icon indicating copy to clipboard operation
react-feather copied to clipboard

change icon dynmically from database

Open abdotigami opened this issue 3 years ago • 2 comments

Icon.{variable} can i do this

abdotigami avatar Oct 15 '21 02:10 abdotigami

I guess if you use the original feather icons library you can replace the href parameter in the SVG to point to the icon you want:

<svg class="feather">
  <use href={`path/to/dist/feather-sprite.svg#{variable}`}/>
</svg>

xavimb avatar Jan 25 '22 19:01 xavimb

@abdotigami Incase you want something like following:

Preview: https://fzqqlu.csb.app/ Sandbox Link: https://codesandbox.io/s/smoosh-https-fzqqlu

akulsr0 avatar Mar 26 '22 14:03 akulsr0