Topmenu mobilne: opcje grup rozciagniete na pelna szerokosc ekranu (akcje, sortowanie, grupowanie, miesiac)
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
import type { Trainee, UserSearchResult } from '../../api/types';
|
||||
import { displayName, fmtDate } from '../../lib/format';
|
||||
import { TRAINEE_FLAGS } from '../../lib/labels';
|
||||
import { cn } from '../../lib/utils';
|
||||
import {
|
||||
Badge,
|
||||
Button,
|
||||
@@ -132,8 +133,11 @@ export default function Trainees() {
|
||||
onClick={() => setSortOpen((o) => !o)}
|
||||
aria-haspopup="true"
|
||||
aria-expanded={sortOpen}
|
||||
/* pomarańcz (accent) tylko gdy wybrano nie-domyślne sortowanie */
|
||||
className={sortKey !== 'none' ? 'border-accent/55 bg-accent/11 text-accent-text' : ''}
|
||||
/* pomarańcz (accent) tylko gdy wybrano nie-domyślne sortowanie; telefon: pełna szerokość */
|
||||
className={cn(
|
||||
'max-md:w-full',
|
||||
sortKey !== 'none' && 'border-accent/55 bg-accent/11 text-accent-text',
|
||||
)}
|
||||
>
|
||||
<ArrowUpDown className="w-4 h-4" />
|
||||
Sortuj: {SORT_OPTIONS.find((s) => s.id === sortKey)?.label}
|
||||
@@ -174,7 +178,7 @@ export default function Trainees() {
|
||||
variant="secondary"
|
||||
aria-pressed={groupByGym}
|
||||
onClick={() => setGroupByGym((v) => !v)}
|
||||
className={groupByGym ? 'border-accent/55 bg-accent/11 text-accent-text' : ''}
|
||||
className={cn('max-md:w-full', groupByGym && 'border-accent/55 bg-accent/11 text-accent-text')}
|
||||
>
|
||||
<Building2 className="w-4 h-4" />
|
||||
Grupuj wg siłowni
|
||||
|
||||
@@ -38,6 +38,8 @@ export function MonthPicker() {
|
||||
}}
|
||||
aria-haspopup="true"
|
||||
aria-expanded={open}
|
||||
/* telefon: rozciąga się między strzałkami na pełną szerokość panelu */
|
||||
className="max-md:flex-1"
|
||||
>
|
||||
<Calendar className="w-4 h-4" />
|
||||
{formatMonth(month)}
|
||||
|
||||
@@ -38,6 +38,8 @@ function ActionButton({ action, onNavigate }: { action: TopbarAction; onNavigate
|
||||
variant={action.variant ?? 'primary'}
|
||||
disabled={action.disabled}
|
||||
onClick={() => (action.to ? onNavigate(action.to) : action.onClick?.())}
|
||||
/* telefon: panel grupy rozciąga opcje na pełną szerokość */
|
||||
className="max-md:w-full"
|
||||
>
|
||||
{Icon && <Icon className="w-4 h-4" />}
|
||||
{action.label}
|
||||
|
||||
Reference in New Issue
Block a user