refactor<genericIconComponent>: Remove unnused SVG icon method

This commit is contained in:
Igor Carvalho 2023-07-17 14:14:33 -03:00
commit c6ffb9a698
2 changed files with 1 additions and 13 deletions

View file

@ -1,4 +1,3 @@
import { Info } from "lucide-react";
import React, { useContext, useEffect, useRef, useState } from "react";
import { Handle, Position, useUpdateNodeInternals } from "reactflow";
import ShadTooltip from "../../../../components/ShadTooltipComponent";

View file

@ -1,5 +1,5 @@
import { IconComponentProps, IconProps } from "../../types/components";
import { nodeIconsLucide, svgIcons } from "../../utils";
import { nodeIconsLucide } from "../../utils";
export function IconFromLucide({
name,
@ -10,15 +10,6 @@ export function IconFromLucide({
return <TargetIcon className={ style } style={{ color: iconColor }} />;
}
export function IconFromSvg({
name,
style,
iconColor,
}: IconProps): JSX.Element {
const TargetSvg = svgIcons[name] ?? nodeIconsLucide["unknown"];
return <TargetSvg className={ style } />;
}
export default function IconComponent({
method,
name,
@ -26,8 +17,6 @@ export default function IconComponent({
iconColor,
}: IconComponentProps): JSX.Element {
switch (method) {
case "SVG":
return <IconFromSvg name={name} style={ style } iconColor={ iconColor } />;
case "LUCIDE":
return <IconFromLucide name={name} style={ style } iconColor={ iconColor } />;
default: