Filtri classifica giocatori tutti su una riga senza scroll
Rinomina "Cacche/partita" in "Cacche" e passa i pill da flex-wrap a flex-nowrap con flex-1/truncate, così entrano tutti su una riga sola senza andare a capo né richiedere swipe orizzontale. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -64,7 +64,7 @@ const criteri = [
|
|||||||
{ id: "mediaVoto", label: "Media voto" },
|
{ id: "mediaVoto", label: "Media voto" },
|
||||||
{ id: "mvp", label: "MVP" },
|
{ id: "mvp", label: "MVP" },
|
||||||
{ id: "palloni", label: "Palloni" },
|
{ id: "palloni", label: "Palloni" },
|
||||||
{ id: "cacchePartita", label: "Cacche/partita" },
|
{ id: "cacchePartita", label: "Cacche" },
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
type Criterio = (typeof criteri)[number]["id"];
|
type Criterio = (typeof criteri)[number]["id"];
|
||||||
@@ -264,14 +264,14 @@ function Squadra() {
|
|||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
<Section titolo="Classifica giocatori">
|
<Section titolo="Classifica giocatori">
|
||||||
<div className="mb-3 flex flex-wrap gap-2">
|
<div className="mb-3 flex flex-nowrap gap-1.5">
|
||||||
{criteri.map((c) => (
|
{criteri.map((c) => (
|
||||||
<button
|
<button
|
||||||
key={c.id}
|
key={c.id}
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setCriterio(c.id)}
|
onClick={() => setCriterio(c.id)}
|
||||||
className={cn(
|
className={cn(
|
||||||
"rounded-full px-3 py-1.5 text-xs font-bold uppercase transition-colors",
|
"min-w-0 flex-1 truncate rounded-full px-1.5 py-1.5 text-center text-[10px] font-bold uppercase transition-colors",
|
||||||
criterio === c.id
|
criterio === c.id
|
||||||
? "bg-accent text-accent-foreground shadow-pop"
|
? "bg-accent text-accent-foreground shadow-pop"
|
||||||
: "bg-secondary text-muted-foreground",
|
: "bg-secondary text-muted-foreground",
|
||||||
|
|||||||
Reference in New Issue
Block a user