Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to add multiple icon to an array

I have an array simply like this

const data = {
products: [
{
   name: 'example1',   
   icon: <exampleIcon />,
},
{
   name: 'example2'
   icon: <exampleIcon2 />
},
],
};

I’m using icons from React Icons

Is it possible for me to add multiple icons to the icon part? like three icons in a row like this exampleIcon exampleIcon exampleIcon

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

you should be able to put multiple icons inside a react fragment

icon: <><exampleIcon /> <exampleIcon2 /></>,
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading