feat(KB-070): add Ayu and One Dark themes to dashboard
- Add Ayu and One Dark to COLOR_THEMES and validThemes arrays - Add CSS theme variables for both themes in styles.css - Update ThemeSelector UI to include new theme options - Extend Theme type to include ayu and one-dark values - Update tests for ThemeSelector and useTheme hooks - Add changeset for minor version bump
This commit is contained in:
@@ -24,6 +24,8 @@ const COLOR_THEMES: { value: ColorTheme; label: string; className: string }[] =
|
||||
{ value: "monochrome", label: "Mono", className: "theme-swatch-monochrome" },
|
||||
{ value: "high-contrast", label: "High Contrast", className: "theme-swatch-high-contrast" },
|
||||
{ value: "solarized", label: "Solarized", className: "theme-swatch-solarized" },
|
||||
{ value: "ayu", label: "Ayu", className: "theme-swatch-ayu" },
|
||||
{ value: "one-dark", label: "One Dark", className: "theme-swatch-one-dark" },
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -84,6 +84,8 @@ describe("ThemeSelector", () => {
|
||||
expect(screen.getByLabelText("Mono theme")).toBeDefined();
|
||||
expect(screen.getByLabelText("High Contrast theme")).toBeDefined();
|
||||
expect(screen.getByLabelText("Solarized theme")).toBeDefined();
|
||||
expect(screen.getByLabelText("Ayu theme")).toBeDefined();
|
||||
expect(screen.getByLabelText("One Dark theme")).toBeDefined();
|
||||
});
|
||||
|
||||
it("marks current color theme as active", () => {
|
||||
@@ -245,7 +247,7 @@ describe("ThemeSelector", () => {
|
||||
const themeOptions = screen.getAllByRole("button").filter(
|
||||
(btn) => btn.className.includes("theme-option")
|
||||
);
|
||||
expect(themeOptions.length).toBe(8);
|
||||
expect(themeOptions.length).toBe(10);
|
||||
|
||||
themeOptions.forEach((btn) => {
|
||||
const swatch = btn.querySelector(".theme-option-swatch");
|
||||
|
||||
Reference in New Issue
Block a user