Use the filled Create rule button on the standard header so it matches that navigation variant.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
2101676429
commit
069cff2fcd
2 files changed
+23
-14
No files matched your search
@@ -170,7 +170,7 @@ const TopContainer = memo<TopProps>(
|
|||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
size="xsmall"
|
size="xsmall"
|
||||||
buttonType="ghost"
|
buttonType={folderTop ? "ghost" : "filled"}
|
||||||
palette="default"
|
palette="default"
|
||||||
onClick={handleCreateRuleClick}
|
onClick={handleCreateRuleClick}
|
||||||
ariaLabel={t("ariaLabels.createNewRule")}
|
ariaLabel={t("ariaLabels.createNewRule")}
|
||||||
|
|||||||
@@ -107,19 +107,28 @@ describe('Top "Create rule" button', () => {
|
|||||||
expect(nav.className).not.toContain("min-h-[var(--space-1000)]");
|
expect(nav.className).not.toContain("min-h-[var(--space-1000)]");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("uses ghost for Create rule", () => {
|
it("uses a filled Create rule button on the standard header", () => {
|
||||||
for (const folderTop of [false, true]) {
|
renderWithProviders(<Top folderTop={false} />);
|
||||||
const { unmount } = renderWithProviders(<Top folderTop={folderTop} />);
|
const button = screen.getByRole("button", {
|
||||||
const button = screen.getByRole("button", {
|
name: /create a new rule/i,
|
||||||
name: /create a new rule/i,
|
});
|
||||||
});
|
expect(button.className).toContain(
|
||||||
expect(button.className).toContain("bg-transparent");
|
"bg-[var(--color-surface-invert-primary)]",
|
||||||
expect(button.className).toContain(
|
);
|
||||||
"text-[var(--color-content-default-brand-primary)]",
|
expect(button.className).toContain(
|
||||||
);
|
"text-[var(--color-content-invert-primary)]",
|
||||||
expect(button.className).toContain("hover:border-transparent");
|
);
|
||||||
unmount();
|
});
|
||||||
}
|
|
||||||
|
it("uses a ghost Create rule button on the folder header", () => {
|
||||||
|
renderWithProviders(<Top folderTop />);
|
||||||
|
const button = screen.getByRole("button", {
|
||||||
|
name: /create a new rule/i,
|
||||||
|
});
|
||||||
|
expect(button.className).toContain("bg-transparent");
|
||||||
|
expect(button.className).toContain(
|
||||||
|
"text-[var(--color-content-default-brand-primary)]",
|
||||||
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user