Skip to content
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
8 changes: 8 additions & 0 deletions packages/studio/src/components/ui/Menu.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -434,4 +434,12 @@ describe("open motion", () => {
/\.duration-open \{[\s\S]*?prefers-reduced-motion: reduce[\s\S]*?transition-duration: 0ms/,
);
});

it("rounds a row's highlight more than the panel that holds it", async () => {
await openActionMenu();

const rowRadius = [...items()[0]!.classList].find((c) => c.startsWith("rounded-"))!;
expect([...popup()!.classList]).toContain("rounded-lg");
expect(compileStudioCss([rowRadius])).toMatch(/calc\(var\(--radius-lg\) \+ 6px\)/);
});
});
2 changes: 1 addition & 1 deletion packages/studio/src/components/ui/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const menuPopup = cn(popupSurface, "min-w-36 p-1 shadow-menu");

/** One row. `data-highlighted` is set by keyboard and pointer alike, so the seen row is the Enter row. */
const itemBase = cn(
"flex cursor-default select-none items-center justify-between gap-6 rounded-sm px-2 py-1.5",
"flex cursor-default select-none items-center justify-between gap-6 rounded-[calc(var(--radius-lg)+6px)] px-2 py-1.5",
"text-step-11 whitespace-nowrap text-text-1",
"outline-hidden transition-colors ease-out-quint duration-hover",
"data-[highlighted]:bg-hover data-[highlighted]:text-text-0",
Expand Down
Loading