From c33205078844506e81b11ae0e0019815b62dde01 Mon Sep 17 00:00:00 2001 From: Igor Carvalho Date: Fri, 14 Jul 2023 17:05:27 -0300 Subject: [PATCH] feat[utils.ts]:Add hard-coded icons into lucide utils icon object --- .../components/genericIconComponent/index.tsx | 1 + src/frontend/src/types/components/index.ts | 1 + src/frontend/src/utils.ts | 91 +++++++++++++++++++ 3 files changed, 93 insertions(+) diff --git a/src/frontend/src/components/genericIconComponent/index.tsx b/src/frontend/src/components/genericIconComponent/index.tsx index cca138100..b93784e45 100644 --- a/src/frontend/src/components/genericIconComponent/index.tsx +++ b/src/frontend/src/components/genericIconComponent/index.tsx @@ -14,6 +14,7 @@ export function IconFromSvg({ name }: IconProps): JSX.Element { export default function IconComponent({ method, name, + className, }: IconComponentProps): JSX.Element { switch (method) { case "SVG": diff --git a/src/frontend/src/types/components/index.ts b/src/frontend/src/types/components/index.ts index 85a8c4d67..4b446b54f 100644 --- a/src/frontend/src/types/components/index.ts +++ b/src/frontend/src/types/components/index.ts @@ -169,4 +169,5 @@ export type IconProps = { export type IconComponentProps = { method: "SVG" | "LUCIDE"; name: string; + className?: string; }; diff --git a/src/frontend/src/utils.ts b/src/frontend/src/utils.ts index be2307823..2e95e6ceb 100644 --- a/src/frontend/src/utils.ts +++ b/src/frontend/src/utils.ts @@ -1,24 +1,68 @@ import clsx, { ClassValue } from "clsx"; import _ from "lodash"; import { + Bell, + Check, + CheckCircle2, + ChevronDown, + ChevronLeft, + ChevronRight, + ChevronsUpDown, + Circle, + Clipboard, + Code2, Compass, + Copy, Cpu, + Download, + DownloadCloud, + Eraser, + ExternalLink, + File, + FileDown, FileSearch, + FileSearch2, + FileText, + FileUp, Fingerprint, Gift, + GitFork, + GithubIcon, Hammer, HelpCircle, + Home, + Info, Laptop2, Layers, Lightbulb, Link, + Lock, + LucideSend, + Menu, MessageCircle, + MessageSquare, + MoonIcon, Paperclip, + Plus, + Redo, Rocket, + Save, Scissors, + Search, + Settings2, + Sparkles, + SunIcon, TerminalSquare, + Trash2, + Undo, + Upload, + Users2, + Variable, Wand2, Wrench, + X, + XCircle, + Zap, } from "lucide-react"; import { Connection, Edge, Node, ReactFlowInstance } from "reactflow"; import { twMerge } from "tailwind-merge"; @@ -265,7 +309,54 @@ export const nodeIconsLucide = { output_parsers: Compass, retrievers: FileSearch, unknown: HelpCircle, + + + Trash2, + X, + XCircle, + Info, + CheckCircle2, + Zap, + MessageSquare, + ExternalLink, + ChevronsUpDown, + Check, + Home, + Users2, + SunIcon, + MoonIcon, + Bell, + ChevronLeft, + ChevronDown, + Plus, + Redo, + Settings2, + Undo, + FileSearch2, + ChevronRight, + Circle, + Clipboard, + Code2, + Variable, + Download, + Eraser, + Lock, + LucideSend, + Sparkles, + DownloadCloud, + File, + FileText, + GitFork, + GithubIcon, + FileDown, + FileUp, + Menu, + Save, + Search, + Copy, + Upload, }; +/* Trash2 */ export const gradients = [ "bg-gradient-to-br from-gray-800 via-rose-700 to-violet-900",