mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-14 04:09:09 +00:00
fix(ui): drop the beta marker from the dark mode toggle (#46305)
This commit is contained in:
parent
365c4885de
commit
22000e1818
2 changed files with 2 additions and 11 deletions
|
|
@ -45,7 +45,7 @@ describe("ThemeToggle", () => {
|
|||
|
||||
it("names the mode the click will switch to, so the button says what it does", async () => {
|
||||
renderToggle();
|
||||
expect(screen.getByRole("button", { name: "Switch to dark mode (beta)" })).toBeInTheDocument();
|
||||
expect(screen.getByRole("button", { name: "Switch to dark mode" })).toBeInTheDocument();
|
||||
|
||||
await userEvent.click(toggle());
|
||||
|
||||
|
|
@ -59,13 +59,4 @@ describe("ThemeToggle", () => {
|
|||
|
||||
expect(localStorage.getItem("theme")).toBe("system");
|
||||
});
|
||||
|
||||
it("keeps the beta marker out of the toolbar label once dark is on", async () => {
|
||||
renderToggle();
|
||||
|
||||
await userEvent.click(toggle());
|
||||
|
||||
expect(toggle()).not.toHaveTextContent("Beta");
|
||||
expect(toggle()).toHaveAccessibleName("Switch to light mode");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { Button } from "@/components/ui/button";
|
|||
const ThemeToggle: React.FC = () => {
|
||||
const { setTheme, resolvedTheme } = useTheme();
|
||||
const isDark = resolvedTheme === "dark";
|
||||
const label = isDark ? "Switch to light mode" : "Switch to dark mode (beta)";
|
||||
const label = isDark ? "Switch to light mode" : "Switch to dark mode";
|
||||
|
||||
return (
|
||||
<Button
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue