mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 16:08:56 +00:00
fix(studio): a menu row's highlight is rounder than its panel (#7395)
This commit is contained in:
@@ -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\)/);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user