Adds src/admin/pages/UiKit.tsx and registers a DEV-only <Route path="ui-kit"> sibling to <Route path="login">, outside the AdminLayout shell. The lazy import uses the ternary `import.meta.env.DEV ? lazy(...) : null` pattern so Vite/Rolldown evaluates the condition at build time and the UiKit chunk is entirely absent from production bundles (confirmed: no UiKit-*.js in dist-client/assets after build:client). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
46 lines
1.6 KiB
TypeScript
46 lines
1.6 KiB
TypeScript
import ScopedCssBaseline from "@mui/material/ScopedCssBaseline";
|
|
import Box from "@mui/material/Box";
|
|
import Stack from "@mui/material/Stack";
|
|
import Typography from "@mui/material/Typography";
|
|
import Chip from "@mui/material/Chip";
|
|
import { Button, Card, TextField } from "../ui";
|
|
import { useTheme } from "../../context/ThemeContext";
|
|
|
|
export default function UiKit() {
|
|
const { theme, toggleTheme } = useTheme();
|
|
return (
|
|
<ScopedCssBaseline>
|
|
<Box sx={{ p: 4, minHeight: "100vh", bgcolor: "background.default" }}>
|
|
<Stack direction="row" alignItems="center" spacing={2} mb={3}>
|
|
<Typography variant="h4">UI Kit</Typography>
|
|
<Button color="inherit" variant="outlined" onClick={toggleTheme}>
|
|
Theme: {theme}
|
|
</Button>
|
|
</Stack>
|
|
|
|
<Stack spacing={3} sx={{ maxWidth: 520 }}>
|
|
<Card>
|
|
<Typography variant="h6" gutterBottom>
|
|
Faktury
|
|
</Typography>
|
|
<Typography color="text.secondary" gutterBottom>
|
|
12 vystavených tento měsíc
|
|
</Typography>
|
|
<Stack direction="row" spacing={1} mb={2}>
|
|
<Chip label="Zaplaceno" color="success" size="small" />
|
|
<Chip label="Po splatnosti" color="error" size="small" />
|
|
</Stack>
|
|
<TextField
|
|
label="Hledat fakturu"
|
|
placeholder="Číslo nebo klient…"
|
|
/>
|
|
<Box mt={2}>
|
|
<Button>Nová faktura</Button>
|
|
</Box>
|
|
</Card>
|
|
</Stack>
|
|
</Box>
|
|
</ScopedCssBaseline>
|
|
);
|
|
}
|