I want to import all the icon files from Icons folder, Is there a better way to do it.
Folder structure:
icon/icons/
homeIcon.js
BarIcon.js
ArrowIcon.js
ArrowUpIcon.js
ArrowDownIcon.js
.....
and then importing it this way:
import { icons } from "../icon/icons";
and then after importing all the files I want to save them in a variable like this:
const allIcons = { type: "select", options: Object.keys(icons) };
and then display in the templates or loop through it. Is there any better way to do it as the above does not work for me. Any help is much Appreciated ! Thanks!