I have imported a number of files containing components (each of them is a different vector shape)
There's one file per shape. Each file is called differently, eg: Circle.js, DarkStar.js, etc but each of them has a default export:
export default SvGElement;
All of them have exactly the same last line as above. I import all of them to another component using their aliases from filenames, eg:
import Circle from './Circle';
import DarkStar from './DarkStar';
I'm trying to render them all with descriptions. I'm fine with rendering them but I cannot access their names (eg. 'Circle', 'DarkStar', etc.)
Circle.name
returns the 'SvgElement' string
Circle.toString()
- returns the content of the component function
How would I go about capturing the name Circle, DarkStar to variables. I cannot change anything in the vector files (only in the file I'm importing them to)