wmira / react-icons-kit

React Svg Icons
https://react-icons-kit.vercel.app/
MIT License
370 stars 44 forks source link

Get an array/object of all icons from a library #39

Closed gregbia closed 5 years ago

gregbia commented 5 years ago

I'm trying to build a font picker which lists multiple svg icons. Is it possible to get all the icon names from a library as an array or object?

wmira commented 5 years ago

Hi @gregbia

import * as mdIcons from 'react-icons-kit/md' You can then iterate keys of mdIcons as Object.keys(mdIcons) and use it as mdIcons[key]