mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-23 16:13:04 +00:00
A célula de nome lia 'nome + território' como bloco: a altura mínima da linha passa a viver no wrapper da célula (preservando o alinhamento dos controles), o link do nome perde o espaço vazio forçado abaixo do texto e o TerritoryLink ganha a variante compact na tabela desktop (o card mobile mantém os 44px de alvo de toque). Verificado geometricamente no browser (1 e 2 linhas): vão texto→texto de 2–4px, sem sobreposição, links intactos, linha com nome curto sem desalinhar as demais colunas. Closes #412
24 lines
629 B
TypeScript
24 lines
629 B
TypeScript
import Link from 'next/link'
|
|
|
|
import { buildTerritoryPageHref } from '@/lib/territoryAnchor'
|
|
import { cn } from '@/lib/utils'
|
|
|
|
export const TerritoryLink = ({
|
|
region,
|
|
compact = false,
|
|
}: {
|
|
region: string
|
|
/** B165 — the desktop name cell reads name+territory as one block, so the
|
|
* territory drops its 44px touch-min there; the mobile card keeps it. */
|
|
compact?: boolean
|
|
}) => (
|
|
<Link
|
|
href={buildTerritoryPageHref(region)}
|
|
className={cn(
|
|
'inline-flex items-center text-muted-foreground underline-offset-4 hover:underline',
|
|
compact ? 'min-h-0' : 'min-h-11',
|
|
)}
|
|
>
|
|
{region}
|
|
</Link>
|
|
)
|