Rende collassabili badge e tesseramento nel profilo e toglie Scout Live dalla home.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,7 +3,7 @@ import { Link } from "@tanstack/react-router";
|
||||
import { Check, Eye, Loader2, Upload } from "lucide-react";
|
||||
import { toast } from "sonner";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { Section } from "@/components/crapp/ui-bits";
|
||||
import { SezioneTendina } from "@/components/crapp/ui-bits";
|
||||
import { Reveal } from "@/components/motion/Reveal";
|
||||
import {
|
||||
caricaFile,
|
||||
@@ -302,7 +302,7 @@ export function ProfiloAmministrativo({
|
||||
scrivi({ ...corrente, [campo]: path });
|
||||
|
||||
return (
|
||||
<Section
|
||||
<SezioneTendina
|
||||
titolo="Dati per il tesseramento"
|
||||
indice={indice}
|
||||
azione={<span className="text-xs font-bold tabular-nums text-muted-foreground">{perc}%</span>}
|
||||
@@ -374,7 +374,7 @@ export function ProfiloAmministrativo({
|
||||
{sporco ? "Salva" : "Salvato"}
|
||||
</button>
|
||||
</div>
|
||||
</Section>
|
||||
</SezioneTendina>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -58,12 +58,14 @@ export function SezioneTendina({
|
||||
titolo,
|
||||
children,
|
||||
anteprima,
|
||||
azione,
|
||||
defaultAperta = false,
|
||||
indice = 0,
|
||||
}: {
|
||||
titolo: string;
|
||||
children: ReactNode;
|
||||
anteprima?: ReactNode;
|
||||
azione?: ReactNode;
|
||||
defaultAperta?: boolean;
|
||||
indice?: number;
|
||||
}) {
|
||||
@@ -77,12 +79,15 @@ export function SezioneTendina({
|
||||
aria-expanded={aperta}
|
||||
>
|
||||
<h2 className="font-display text-lg uppercase tracking-wide">{titolo}</h2>
|
||||
<ChevronDown
|
||||
className={cn(
|
||||
"h-4 w-4 shrink-0 text-muted-foreground transition-transform",
|
||||
aperta && "rotate-180",
|
||||
)}
|
||||
/>
|
||||
<span className="flex shrink-0 items-center gap-2">
|
||||
{azione}
|
||||
<ChevronDown
|
||||
className={cn(
|
||||
"h-4 w-4 text-muted-foreground transition-transform",
|
||||
aperta && "rotate-180",
|
||||
)}
|
||||
/>
|
||||
</span>
|
||||
</button>
|
||||
{anteprima}
|
||||
{aperta ? children : null}
|
||||
|
||||
Reference in New Issue
Block a user