feat: move color themes into a bundled themes plugin

This commit is contained in:
LukeGus committed 2026-10-18 17:56:34 -05:00
1 parent d049588f7f
commit b414b85746
20 files changed
+305 -406

No files matched your search

@@ -95,17 +95,17 @@ describe("ThemeGrid", () => {
render(<ThemeGrid value="dark" onChange={onChange} />);
const buttons = screen.getAllByRole("button");
expect(buttons).toHaveLength(THEMES.length);
fireEvent.click(buttons[THEMES.findIndex((t) => t.id === "gruvbox")]);
expect(onChange).toHaveBeenCalledWith("gruvbox");
fireEvent.click(buttons[THEMES.findIndex((t) => t.id === "light")]);
expect(onChange).toHaveBeenCalledWith("light");
});
it("previews a theme while it is hovered", () => {
render(<ThemeGrid value="dark" onChange={vi.fn()} />);
const nord =
screen.getAllByRole("button")[THEMES.findIndex((t) => t.id === "nord")];
fireEvent.mouseEnter(nord);
expect(theme.setThemePreview).toHaveBeenLastCalledWith("nord");
fireEvent.mouseLeave(nord);
const light =
screen.getAllByRole("button")[THEMES.findIndex((t) => t.id === "light")];
fireEvent.mouseEnter(light);
expect(theme.setThemePreview).toHaveBeenLastCalledWith("light");
fireEvent.mouseLeave(light);
expect(theme.setThemePreview).toHaveBeenLastCalledWith(null);
});
});