tabler-icons-react
tabler-icons-react copied to clipboard
Get icon by string
Hello, In my database, I need to store the icons as a string like "shoe" or "x". But if I want them in my DOM, I need to build something like this:
import { Shoe, X } from "tabler-icons-react";
const data = {
shoe: Shoe,
x: X,
}
const selectedIcon = data["shoe"];
Is there an easier way? Greetings, PixelPage