feat(client): add UI kit, data layer, app shell, and Table component
- design token system (Atlantis, Kimberly, Powder Ash palette) - Button, Badge, Input, Select, Card, SidePanel, Breadcrumbs components - generic typed Table<T> component with loading/empty states - API data layer: typed fetch client for environments, keys, sessions, scenarios - Vite dev proxy targeting server on port 13000 - App shell with SidePanel nav and four entity pages (Environments, Keys, Sessions, Scenarios) - Storybook config with dark/light theme toggle and a11y addon
This commit is contained in:
1 parent
5cc16725fb
commit
9916ef5aaf
47 files changed
+3910
-10
No files matched your search
+47
-1
@@ -1,3 +1,49 @@
|
||||
import styles from './App.module.css';
|
||||
import { SidePanel } from './ui';
|
||||
import { EnvironmentsPage } from './pages/EnvironmentsPage';
|
||||
import { KeysPage } from './pages/KeysPage';
|
||||
import { SessionsPage } from './pages/SessionsPage';
|
||||
import { ScenariosPage } from './pages/ScenariosPage';
|
||||
import { useState } from 'react';
|
||||
|
||||
type Section = 'environments' | 'keys' | 'sessions' | 'scenarios';
|
||||
|
||||
const NAV: { id: Section; label: string }[] = [
|
||||
{ id: 'environments', label: 'Environments' },
|
||||
{ id: 'keys', label: 'Keys' },
|
||||
{ id: 'sessions', label: 'Sessions' },
|
||||
{ id: 'scenarios', label: 'Scenarios' },
|
||||
];
|
||||
|
||||
export default function App() {
|
||||
return <h1>Hello World</h1>
|
||||
const [active, setActive] = useState<Section>('scenarios');
|
||||
|
||||
return (
|
||||
<div className={styles.shell}>
|
||||
<SidePanel
|
||||
header={<span className={styles.brand}>QA Bot</span>}
|
||||
width={220}
|
||||
>
|
||||
<nav className={styles.nav}>
|
||||
{NAV.map(({ id, label }) => (
|
||||
<button
|
||||
key={id}
|
||||
className={`${styles.navItem} ${active === id ? styles.navItemActive : ''}`}
|
||||
onClick={() => setActive(id)}
|
||||
>
|
||||
{label}
|
||||
</button>
|
||||
))}
|
||||
</nav>
|
||||
</SidePanel>
|
||||
|
||||
<main className={styles.main}>
|
||||
{active === 'environments' && <EnvironmentsPage />}
|
||||
{active === 'keys' && <KeysPage />}
|
||||
{active === 'sessions' && <SessionsPage />}
|
||||
{active === 'scenarios' && <ScenariosPage />}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user