Allinea l'altezza di input, select e date nei form a un'unica misura.
input[type="date"] resta più alto di un input di testo anche con appearance-none: h-10 esplicito su classiInput allinea tutti i campi. La textarea note usa h-auto per non perdere le due righe. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
77f587b53b
commit
50a712c276
2 files changed
+8
-3
No files matched your search
@@ -156,9 +156,14 @@ export function SezioneTendina({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Classi condivise di input, select e textarea nei form dell'app. */
|
/**
|
||||||
|
* Classi condivise di input, select e textarea nei form dell'app. `h-10`:
|
||||||
|
* `input[type="date"]` ha al suo interno segmenti e icona nativi che, anche
|
||||||
|
* con `appearance-none`, restano un filo più alti di un input di testo a
|
||||||
|
* parità di padding — un'altezza esplicita allinea tutti i campi tra loro.
|
||||||
|
*/
|
||||||
export const classiInput =
|
export const classiInput =
|
||||||
"w-full min-w-0 rounded-xl border border-border bg-background px-3 py-2 text-sm";
|
"h-10 w-full min-w-0 rounded-xl border border-border bg-background px-3 py-2 text-sm";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Etichetta + controllo di un form. `min-w-0`: dentro `grid-cols-2` questa label
|
* Etichetta + controllo di un form. `min-w-0`: dentro `grid-cols-2` questa label
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ function GestioneEventi() {
|
|||||||
maxLength={300}
|
maxLength={300}
|
||||||
rows={2}
|
rows={2}
|
||||||
onChange={(e) => aggiorna({ note: e.target.value })}
|
onChange={(e) => aggiorna({ note: e.target.value })}
|
||||||
className={classiInput}
|
className={cn(classiInput, "h-auto")}
|
||||||
/>
|
/>
|
||||||
</Campo>
|
</Campo>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user