ported schema builder
This commit is contained in:
23
components/Icon/index.tsx
Normal file
23
components/Icon/index.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import { FC } from "react";
|
||||
import Help from "../../assets/icons/Help Icon.svg";
|
||||
import Trash from "../../assets/icons/Trash Icon.svg";
|
||||
import Trash_hover from "../../assets/icons/Trash Icon Open.svg";
|
||||
import Anvil from "../../assets/icons/Anvil Icon.svg";
|
||||
|
||||
const library = {
|
||||
Help,
|
||||
Trash,
|
||||
Trash_hover,
|
||||
Anvil,
|
||||
};
|
||||
|
||||
interface IProps {
|
||||
className: string;
|
||||
icon: keyof typeof library;
|
||||
}
|
||||
|
||||
export const Icon: FC<IProps> = ({ className, icon }) => {
|
||||
const ICON = library[icon];
|
||||
|
||||
return <ICON className={className} />;
|
||||
};
|
Reference in New Issue
Block a user