da50f3b5ea
- Design tokens (ds.ts, theme.ts, scoreTheme.ts): new warm palette (#152642 navy, #f9f8f6 warm white, #e8e7e4 borders, #b8975a gold accent), flat score tier badges replacing CSS gradients, Inter + DM Serif Display typography - Card components: white-background cards, DM Serif score numbers, max-2 badge chips with +N overflow tooltip, editorial score badge positioning - Layout shell: gold left-accent nav active state, 64px top bar, outlined workspace chip, DM Serif page titles - Shared atoms: GenericBadge (outlined/solid variants), ResultFilterBar (simplified chip styles), DecisionContextPanel (dot metrics, no left accent) - Global replacement (118 files): #1e3a5f→#152642, #e2e8f0→#e8e7e4, #f4f6f9→#f9f8f6 — all handled via Node.js for proper UTF-8 safety Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
47 lines
1.4 KiB
TypeScript
47 lines
1.4 KiB
TypeScript
import { Box, IconButton, Tooltip } from '@mui/material'
|
|
import { LayoutGrid, LayoutList } from 'lucide-react'
|
|
|
|
interface Props {
|
|
view: 'list' | 'grid'
|
|
onChange: (v: 'list' | 'grid') => void
|
|
}
|
|
|
|
export function ViewToggle({ view, onChange }: Props) {
|
|
return (
|
|
<Box sx={{ display: 'flex', gap: 0.25, border: '1px solid #e2e8f0', borderRadius: 1, overflow: 'hidden' }}>
|
|
<Tooltip title="Listenansicht">
|
|
<IconButton
|
|
size="small"
|
|
onClick={() => onChange('list')}
|
|
sx={{
|
|
borderRadius: 0,
|
|
width: 32,
|
|
height: 32,
|
|
bgcolor: view === 'list' ? '#152642' : 'transparent',
|
|
color: view === 'list' ? 'white' : '#64748b',
|
|
'&:hover': { bgcolor: view === 'list' ? '#162d4a' : '#f1f5f9' },
|
|
}}
|
|
>
|
|
<LayoutList size={15} />
|
|
</IconButton>
|
|
</Tooltip>
|
|
<Tooltip title="Kartenansicht">
|
|
<IconButton
|
|
size="small"
|
|
onClick={() => onChange('grid')}
|
|
sx={{
|
|
borderRadius: 0,
|
|
width: 32,
|
|
height: 32,
|
|
bgcolor: view === 'grid' ? '#152642' : 'transparent',
|
|
color: view === 'grid' ? 'white' : '#64748b',
|
|
'&:hover': { bgcolor: view === 'grid' ? '#162d4a' : '#f1f5f9' },
|
|
}}
|
|
>
|
|
<LayoutGrid size={15} />
|
|
</IconButton>
|
|
</Tooltip>
|
|
</Box>
|
|
)
|
|
}
|