Make agents list force list view on mobile with condensed trailing info. Add mobile bottom bar for config save/cancel and live run indicator on agent detail. Make MetricCard, PageTabBar, Dashboard tasks, and ActivityRow responsive for small screens. Add xs avatar size for inline text flow. Remove redundant budget displays from agent overview, properties panel, costs tab, and config form. Add attachment activity verb labels. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
45 lines
1.2 KiB
TypeScript
45 lines
1.2 KiB
TypeScript
import type { ReactNode } from "react";
|
|
import { TabsList, TabsTrigger } from "@/components/ui/tabs";
|
|
import { useSidebar } from "../context/SidebarContext";
|
|
|
|
export interface PageTabItem {
|
|
value: string;
|
|
label: ReactNode;
|
|
}
|
|
|
|
interface PageTabBarProps {
|
|
items: PageTabItem[];
|
|
value?: string;
|
|
onValueChange?: (value: string) => void;
|
|
}
|
|
|
|
export function PageTabBar({ items, value, onValueChange }: PageTabBarProps) {
|
|
const { isMobile } = useSidebar();
|
|
|
|
if (isMobile && value !== undefined && onValueChange) {
|
|
return (
|
|
<select
|
|
value={value}
|
|
onChange={(e) => onValueChange(e.target.value)}
|
|
className="h-9 rounded-md border border-border bg-background px-2 py-1 text-base focus:outline-none focus:ring-1 focus:ring-ring"
|
|
>
|
|
{items.map((item) => (
|
|
<option key={item.value} value={item.value}>
|
|
{typeof item.label === "string" ? item.label : item.value}
|
|
</option>
|
|
))}
|
|
</select>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<TabsList variant="line">
|
|
{items.map((item) => (
|
|
<TabsTrigger key={item.value} value={item.value}>
|
|
{item.label}
|
|
</TabsTrigger>
|
|
))}
|
|
</TabsList>
|
|
);
|
|
}
|