Files
nanobot/webui/browser/tall-dialog-fixture.tsx
T
chengyongru 7782095a85 perf(ci): speed up full WebUI regression gates (#6684)
* perf(ci): speed up full WebUI regression gates

* perf(ci): balance browser shards with measured hosted timings
2026-11-17 10:26:45 +08:00

18 lines
956 B
TypeScript

import { Dialog, DialogClose, DialogContent, DialogDescription, DialogTitle, DialogTrigger } from "@/components/ui/dialog";
export function TallDialogFixture({ placement }: { placement: "center" | "bottom" }) {
return <main aria-label="Background content" style={{ height: 240, overflowY: "auto" }}>
<div style={{ minHeight: 1800 }}><Dialog>
<DialogTrigger asChild><button>Open tall dialog</button></DialogTrigger>
<DialogContent placement={placement}>
<DialogTitle>Tall dialog</DialogTitle>
<DialogDescription>All controls must remain reachable in a short viewport.</DialogDescription>
{Array.from({ length: 30 }, (_, index) => <label key={index}>
Field {index + 1}<input aria-label={`Field ${index + 1}`} style={{ display: "block", height: 40 }} />
</label>)}
<DialogClose asChild><button>Save tall dialog</button></DialogClose>
</DialogContent>
</Dialog></div>
</main>;
}