mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-03 02:22:24 +00:00
feat(ui): molecules/models/columns heroicon to lucide
- Heroicon TrashIcon \u2192 lucide Trash2, replacing tremor Icon wrapper with a plain <button>/<span>. hover:text-red-600 \u2192 destructive. - Kept antd Divider/Flex/Popover/Space/Tooltip/Typography and tremor Badge/Button/Icon (phase 1 whitelist, inline eslint-disable). Gates: TS \u2713 | Build \u2713. Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
This commit is contained in:
parent
a7dd430195
commit
e52f15d0c5
1 changed files with 15 additions and 7 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { EditOutlined, InfoCircleOutlined, SyncOutlined } from "@ant-design/icons";
|
||||
import { TrashIcon } from "@heroicons/react/outline";
|
||||
import { Trash2 } from "lucide-react";
|
||||
import { ColumnDef } from "@tanstack/react-table";
|
||||
// eslint-disable-next-line litellm-ui/no-banned-ui-imports
|
||||
import { Badge, Button, Icon } from "@tremor/react";
|
||||
|
|
@ -410,21 +410,29 @@ export const columns = (
|
|||
<div className="flex items-center justify-end gap-2 pr-4">
|
||||
{isConfigModel ? (
|
||||
<Tooltip title="Config model cannot be deleted on the dashboard. Please delete it from the config file.">
|
||||
<Icon icon={TrashIcon} size="sm" className="opacity-50 cursor-not-allowed" />
|
||||
<span className="inline-flex items-center opacity-50 cursor-not-allowed">
|
||||
<Trash2 className="h-4 w-4" />
|
||||
</span>
|
||||
</Tooltip>
|
||||
) : (
|
||||
<Tooltip title="Delete model">
|
||||
<Icon
|
||||
icon={TrashIcon}
|
||||
size="sm"
|
||||
<button
|
||||
type="button"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
if (canEditModel && onDeleteClick) {
|
||||
onDeleteClick(model.model_info.id);
|
||||
}
|
||||
}}
|
||||
className={!canEditModel ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:text-red-600"}
|
||||
/>
|
||||
className={
|
||||
!canEditModel
|
||||
? "opacity-50 cursor-not-allowed"
|
||||
: "cursor-pointer hover:text-destructive"
|
||||
}
|
||||
aria-label="Delete model"
|
||||
>
|
||||
<Trash2 className="h-4 w-4" />
|
||||
</button>
|
||||
</Tooltip>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue