refactor[genericIconComponent]: Remove unnecessary svg method function
This commit is contained in:
parent
5af49e5a36
commit
56eb70674a
2 changed files with 1 additions and 16 deletions
|
|
@ -1,15 +1,6 @@
|
||||||
import { IconComponentProps, IconProps } from "../../types/components";
|
import { IconComponentProps } from "../../types/components";
|
||||||
import { nodeIconsLucide } from "../../utils";
|
import { nodeIconsLucide } from "../../utils";
|
||||||
|
|
||||||
export function IconFromLucide({
|
|
||||||
name,
|
|
||||||
style,
|
|
||||||
iconColor,
|
|
||||||
}: IconProps): JSX.Element {
|
|
||||||
const TargetIcon = nodeIconsLucide[name] ?? nodeIconsLucide["unknown"];
|
|
||||||
return <TargetIcon className={style} style={{ color: iconColor }} />;
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function IconComponent({
|
export default function IconComponent({
|
||||||
name,
|
name,
|
||||||
style,
|
style,
|
||||||
|
|
|
||||||
|
|
@ -162,12 +162,6 @@ export interface IVarHighlightType {
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type IconProps = {
|
|
||||||
name: string;
|
|
||||||
style: string;
|
|
||||||
iconColor?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type IconComponentProps = {
|
export type IconComponentProps = {
|
||||||
name: string;
|
name: string;
|
||||||
style: string;
|
style: string;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue