mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
fix(ui): keep the time range menu flush after the move to shared
The move carried a copy from before the menu alignment fixes landed on this branch; this restores the trigger width and the flush menu edge. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
1325389624
commit
773bfef066
1 changed files with 9 additions and 3 deletions
|
|
@ -36,20 +36,26 @@ interface TimeRangeControlsProps {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Joined control group: the time range (opens presets) and Live. */
|
/** Joined control group: the time range (opens presets) and Live. */
|
||||||
export function TimeRangeControls({ range, zoom, onHoursChange, showLive = true, onLiveChange }: TimeRangeControlsProps) {
|
export function TimeRangeControls({
|
||||||
|
range,
|
||||||
|
zoom,
|
||||||
|
onHoursChange,
|
||||||
|
showLive = true,
|
||||||
|
onLiveChange,
|
||||||
|
}: TimeRangeControlsProps) {
|
||||||
const live = isLive(range);
|
const live = isLive(range);
|
||||||
return (
|
return (
|
||||||
<div className="flex items-stretch divide-x divide-border border-l border-border">
|
<div className="flex items-stretch divide-x divide-border border-l border-border">
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger
|
<DropdownMenuTrigger
|
||||||
aria-label="Time range"
|
aria-label="Time range"
|
||||||
className={cn(SEGMENT, "text-foreground hover:bg-muted/60")}
|
className={cn(SEGMENT, "min-w-40 justify-between text-foreground hover:bg-muted/60")}
|
||||||
data-testid="time-range-trigger"
|
data-testid="time-range-trigger"
|
||||||
>
|
>
|
||||||
<span className="tabular-nums">{rangeLabel(range, zoom)}</span>
|
<span className="tabular-nums">{rangeLabel(range, zoom)}</span>
|
||||||
<ChevronDown className="size-3.5 text-muted-foreground" />
|
<ChevronDown className="size-3.5 text-muted-foreground" />
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
<DropdownMenuContent align="end" className="w-auto min-w-44">
|
<DropdownMenuContent align="end" sideOffset={1} className="min-w-0 rounded-t-none">
|
||||||
<DropdownMenuRadioGroup
|
<DropdownMenuRadioGroup
|
||||||
value={String(range.hours)}
|
value={String(range.hours)}
|
||||||
onValueChange={(value: string) => onHoursChange(Number(value))}
|
onValueChange={(value: string) => onHoursChange(Number(value))}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue