Skip to content

Commit af143f3

Browse files
committed
fix(usage): keep date controls reachable across window sizes
1 parent 53f29b3 commit af143f3

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎apps/web/src/components/usage/UsagePage.tsx‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ export function UsagePage() {
431431
);
432432

433433
const topbarContent = (
434-
<div className="grid w-full min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-3 py-2 @4xl/usage-header:flex">
434+
<div className="grid w-full min-w-0 grid-cols-1 items-center gap-x-3 gap-y-2 py-2 @lg/usage-header:grid-cols-[minmax(0,1fr)_auto] @4xl/usage-header:flex">
435435
<WorkspaceBreadcrumb ariaLabel="Usage breadcrumb" className="min-w-0">
436436
<WorkspaceBreadcrumbItem>
437437
<h1>Usage</h1>
@@ -468,6 +468,15 @@ export function UsagePage() {
468468
</span>
469469
) : null}
470470
<div className="ms-auto hidden shrink-0 items-center justify-end gap-2 @4xl/usage-header:flex">
471+
{!showingLimits ? (
472+
<span className="@7xl/usage-header:hidden">
473+
<UsageRangePicker
474+
compact
475+
window={window}
476+
onChange={(sinceDay, untilDay) => setRange({ kind: "days", sinceDay, untilDay })}
477+
/>
478+
</span>
479+
) : null}
471480
{/* Limits are always current, so they have no period. The period sits before the metric
472481
tabs so dropping it never moves them. */}
473482
{showingLimits ? null : (

0 commit comments

Comments
 (0)