import * as HeroIconsOutline from "@heroicons/react/outline"; import * as HeroIconsSolid from "@heroicons/react/solid"; import React, { SVGProps } from "react"; import { IconName } from "../types"; export interface IconProps extends SVGProps { type?: "outline" | "solid"; name: IconName; } export default function Icon({ name, type = "solid", ...rest }: IconProps) { const Element = (type === "solid" ? HeroIconsSolid : HeroIconsOutline)[name]; return ; }