react-circular-progressbar icon indicating copy to clipboard operation
react-circular-progressbar copied to clipboard

Unable to add image from local project to CircularProgressbar

Open blueeDeveloper opened this issue 3 years ago • 0 comments

🐛 Bug report

Unable to add svg image from project folder to circularProgressBar

Please describe what the problem is -

I saw this example <CircularProgressbarWithChildren value={66}> <img style={{ width: 40, marginTop: -5 }} src="https://i.imgur.com/b9NyUGm.png" alt="doge" /> </CircularProgressbarWithChildren>;

This works because the image source is web (https://i.imgur.com/b9NyUGm.png) but if i try to include local image, it doesnot pick up.

If i just do following, i dont see the image. <img style={{ width: 40, marginTop: -5 }} src="../../assets/icons/white-check.svg" alt="doge" />

Even if i try the react way, i get an error saying img src should be a string.

import { ReactComponent as WhiteCheck } from '../../assets/icons/white-check.svg'; <img style={{ width: 40, marginTop: -5 }} src={WhiteCheck} alt="doge" />

  • What version of react-circular-progressbar are you using? "version": "2.0.4",

blueeDeveloper avatar Jul 21 '22 04:07 blueeDeveloper