Skip to content

chore(ui): migrate DefaultUserSettings buttons from Tremor to antd#23787

Merged
ryan-crabbe merged 2 commits intolitellm_ryan_march_16from
litellm_migrate-default-user-settings-antd
Mar 16, 2026
Merged

chore(ui): migrate DefaultUserSettings buttons from Tremor to antd#23787
ryan-crabbe merged 2 commits intolitellm_ryan_march_16from
litellm_migrate-default-user-settings-antd

Conversation

@ryan-crabbe
Copy link
Copy Markdown
Contributor

@ryan-crabbe ryan-crabbe commented Mar 16, 2026

Type

🧹 Refactoring

Changes

  • Migrate Button components in DefaultUserSettings.tsx from Tremor to antd
  • Prop mappings: size="sm"size="small", variant="secondary" → default, default → type="primary", icon={Component}icon={<Component />}
  • No functionality changes — all onClick, disabled, loading, and className props unchanged
Screenshot 2026-03-16 at 3 34 16 PM Screenshot 2026-03-16 at 3 34 58 PM

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Mar 16, 2026 10:38pm

Request Review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 16, 2026

Greptile Summary

This PR migrates the five Button usages in DefaultUserSettings.tsx from Tremor to antd, consistent with the dashboard's ongoing UI library consolidation. The mapping is accurate: Tremor's size="sm" becomes antd's size="small", variant="secondary" maps to the antd default button, the primary action buttons gain type="primary", the remove button gains the semantic danger prop (replacing the manual className="text-red-500 hover:text-red-700"), and icon props are correctly changed from component references (icon={DeleteOutlined}) to JSX elements (icon={<DeleteOutlined />}) as required by antd. No functional behaviour, event handlers, or data flow is altered.

Key changes:

  • Button import moved from @tremor/react to antd
  • "Remove" button: size="small" + danger replaces Tremor's size="sm" + manual red class
  • "Add Team" button: icon wrapping fixed to JSX element; maps to antd default style
  • "Cancel" button: maps to antd default style (appropriate for a cancel action)
  • "Save Changes" and "Edit Settings" buttons: type="primary" added for visual prominence

Confidence Score: 5/5

  • This PR is safe to merge — it is a pure UI library migration with no functional changes.
  • All five button prop mappings are correct for antd. Logic, event handlers, and state management are completely untouched. The only observable difference is styling, which matches the intended antd equivalents and is verified by the screenshots in the PR description.
  • No files require special attention.

Important Files Changed

Filename Overview
ui/litellm-dashboard/src/components/DefaultUserSettings.tsx Migrates five Button usages from Tremor to antd with correct prop mappings (size="small", danger, icon as JSX element, type="primary"). No functional logic changed.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[DefaultUserSettings] --> B{isEditing?}
    B -- No --> C["Button type='primary'\nEdit Settings"]
    B -- Yes --> D["Button default\nCancel"]
    B -- Yes --> E["Button type='primary' loading={saving}\nSave Changes"]
    A --> F[renderTeamsEditor]
    F --> G["Button size='small' danger\nicon=&lt;DeleteOutlined /&gt;\nRemove"]
    F --> H["Button default\nicon=&lt;PlusOutlined /&gt;\nAdd Team"]

    style C fill:#1677ff,color:#fff
    style E fill:#1677ff,color:#fff
    style G fill:#ff4d4f,color:#fff
Loading

Last reviewed commit: 5befc02

@ryan-crabbe ryan-crabbe merged commit 8695171 into litellm_ryan_march_16 Mar 16, 2026
5 checks passed
@ryan-crabbe ryan-crabbe deleted the litellm_migrate-default-user-settings-antd branch March 16, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant