feat(client): add ThemeSwitcher and relocate stories to .storybook/
- add lucide-react for Sun/Moon icons - add useTheme hook persisting choice to localStorage with prefers-color-scheme fallback - add ThemeSwitcher button component wired into SidePanel header - add blocking inline script to index.html to prevent flash-of-wrong-theme - move all *.stories.tsx from src/ into .storybook/stories/ and update imports - update main.ts stories glob to .storybook/stories/**
This commit is contained in:
1 parent
9916ef5aaf
commit
aefa1db2bd
20 files changed
+134
-43
No files matched your search
+7
-2
@@ -1,5 +1,5 @@
|
||||
import styles from './App.module.css';
|
||||
import { SidePanel } from './ui';
|
||||
import { SidePanel, ThemeSwitcher } from './ui';
|
||||
import { EnvironmentsPage } from './pages/EnvironmentsPage';
|
||||
import { KeysPage } from './pages/KeysPage';
|
||||
import { SessionsPage } from './pages/SessionsPage';
|
||||
@@ -21,7 +21,12 @@ export default function App() {
|
||||
return (
|
||||
<div className={styles.shell}>
|
||||
<SidePanel
|
||||
header={<span className={styles.brand}>QA Bot</span>}
|
||||
header={
|
||||
<div className={styles.header}>
|
||||
<span className={styles.brand}>QA Bot</span>
|
||||
<ThemeSwitcher />
|
||||
</div>
|
||||
}
|
||||
width={220}
|
||||
>
|
||||
<nav className={styles.nav}>
|
||||
|
||||
Reference in new issue
Block a user