Skip to content

Converted action buttons to sticky footer action buttons #11293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions ui/litellm-dashboard/src/components/key_edit_view.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from "react";
import { Form, Input, Select } from "antd";
import { Button, TextInput } from "@tremor/react";
import { Form, Input, Select, Button as AntdButton } from "antd";
import { Button as TremorButton, TextInput } from "@tremor/react";
import { KeyResponse } from "./key_team_helpers/key_list";
import { fetchTeamModels } from "../components/create_key_button";
import { modelAvailableCall } from "./networking";
Expand Down Expand Up @@ -200,13 +200,15 @@ export function KeyEditView({
<Input />
</Form.Item>

<div className="flex justify-end gap-2 mt-6">
<Button variant="light" onClick={onCancel}>
Cancel
</Button>
<Button>
Save Changes
</Button>
<div className="sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]">
<div className="flex justify-end items-center gap-2">
<AntdButton onClick={onCancel}>
Cancel
</AntdButton>
<TremorButton type="submit">
Save Changes
</TremorButton>
</div>
</div>
</Form>
);
Expand Down
4 changes: 2 additions & 2 deletions ui/litellm-dashboard/src/components/key_info_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export default function KeyInfoView({ keyId, onClose, keyData, accessToken, user
};

return (
<div className="p-4">
<div className="w-full h-screen p-4">
<div className="flex justify-between items-center mb-6">
<div>
<Button
Expand Down Expand Up @@ -273,7 +273,7 @@ export default function KeyInfoView({ keyId, onClose, keyData, accessToken, user

{/* Settings Panel */}
<TabPanel>
<Card>
<Card className="overflow-y-auto max-h-[65vh]">
<div className="flex justify-between items-center mb-4">
<Title>Key Settings</Title>
{!isEditing && userRole && rolesWithWriteAccess.includes(userRole) && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ const OrganizationInfoView: React.FC<OrganizationInfoProps> = ({

{/* Settings Panel */}
<TabPanel>
<Card>
<Card className="overflow-y-auto max-h-[65vh]">
<div className="flex justify-between items-center mb-4">
<Title>Organization Settings</Title>
{(canEditOrg && !isEditing) && (
Expand Down Expand Up @@ -423,13 +423,15 @@ const OrganizationInfoView: React.FC<OrganizationInfoProps> = ({
<Input.TextArea rows={4} />
</Form.Item>

<div className="flex justify-end gap-2 mt-6">
<Button onClick={() => setIsEditing(false)}>
Cancel
</Button>
<TremorButton type="submit">
Save Changes
</TremorButton>
<div className="sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]">
<div className="flex justify-end items-center gap-2">
<Button onClick={() => setIsEditing(false)}>
Cancel
</Button>
<TremorButton type="submit">
Save Changes
</TremorButton>
</div>
</div>
</Form>
) : (
Expand Down
21 changes: 11 additions & 10 deletions ui/litellm-dashboard/src/components/team/team_info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ const TeamInfoView: React.FC<TeamInfoProps> = ({

{/* Settings Panel */}
<TabPanel>
<Card>
<Card className="overflow-y-auto max-h-[65vh]">
<div className="flex justify-between items-center mb-4">
<Title>Team Settings</Title>
{(canEditTeam && !isEditing) && (
Expand Down Expand Up @@ -471,15 +471,16 @@ const TeamInfoView: React.FC<TeamInfoProps> = ({
<Form.Item label="Metadata" name="metadata">
<Input.TextArea rows={10} />
</Form.Item>


<div className="flex justify-end gap-2 mt-6">
<Button onClick={() => setIsEditing(false)}>
Cancel
</Button>
<TremorButton>
Save Changes
</TremorButton>

<div className="sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]">
<div className="flex justify-end items-center gap-2">
<Button htmlType="button" onClick={() => setIsEditing(false)}>
Cancel
</Button>
<TremorButton type="submit">
Save Changes
</TremorButton>
</div>
</div>
</Form>
) : (
Expand Down
Loading