diff --git a/ui/litellm-dashboard/src/components/prompts/add_prompt_form.tsx b/ui/litellm-dashboard/src/components/prompts/add_prompt_form.tsx index cdb77bb66fc..de24a2fd85a 100644 --- a/ui/litellm-dashboard/src/components/prompts/add_prompt_form.tsx +++ b/ui/litellm-dashboard/src/components/prompts/add_prompt_form.tsx @@ -1,7 +1,15 @@ import React, { useState } from "react"; -import { Modal, Form, Select, Upload, Button, Divider } from "antd"; -import { TextInput } from "@tremor/react"; -import { UploadOutlined } from "@ant-design/icons"; +import { Button } from "@/components/ui/button"; +import { + Dialog, + DialogContent, + DialogFooter, + DialogHeader, + DialogTitle, +} from "@/components/ui/dialog"; +import { Input } from "@/components/ui/input"; +import { Form, Select, Upload } from "antd"; +import { Upload as UploadIcon } from "lucide-react"; import type { UploadFile, UploadProps } from "antd"; import { convertPromptFileToJson, createPromptCall } from "../networking"; import NotificationsManager from "../molecules/notifications_manager"; @@ -51,6 +59,7 @@ const AddPromptForm: React.FC = ({ visible, onClose, accessT setLoading(true); + // eslint-disable-next-line @typescript-eslint/no-explicit-any let promptData: any = {}; if (promptIntegration === "dotprompt" && fileList.length > 0) { @@ -116,54 +125,72 @@ const AddPromptForm: React.FC = ({ visible, onClose, accessT }; return ( - - Cancel - , - , - ]} - width={600} + onOpenChange={(o) => (!o ? handleCancel() : undefined)} > -
- - - + + + Add New Prompt + + + + + - - - + + + - {promptIntegration === "dotprompt" && ( - <> - - - - - - {fileList.length > 0 &&
Selected: {fileList[0].name}
} -
- - )} - -
+ {promptIntegration === "dotprompt" && ( + <> +
+ + + + + {fileList.length > 0 && ( +
+ Selected: {fileList[0].name} +
+ )} +
+ + )} + + + + + + + ); };