MCPcopy
hub / github.com/srcbookdev/srcbook / LightDarkModeDebugChanger

Function LightDarkModeDebugChanger

packages/web/src/components/navbar.tsx:35–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33} from '@srcbook/components/src/components/ui/tooltip';
34
35function LightDarkModeDebugChanger() {
36 const { theme, toggleTheme } = useTheme();
37
38 if (process.env.NODE_ENV === 'production') {
39 return null;
40 }
41
42 return (
43 <div className="absolute left-1/2 -translate-x-1/2">
44 <button
45 onClick={toggleTheme}
46 className="border-none outline-none text-muted-foreground hover:text-foreground font-semibold transition-colors"
47 >
48 {theme === 'light' ? '(DEV) Dark mode' : '(DEV) Light mode'}
49 </button>
50 </div>
51 );
52}
53
54type SessionNavbarProps = {
55 readOnly?: boolean;

Callers

nothing calls this directly

Calls 1

useThemeFunction · 0.85

Tested by

no test coverage detected