@*
Bottom sheet (STILE_UI §6.14): sale dal basso, maniglia di trascinamento,
testata con titolo e chiusura, un'unica linea di struttura, corpo scorrevole.
Sostituisce i menu flottanti: stessa funzione, bersagli molto piu' grandi.
*@
@if (Open)
{
@Title
@if (!string.IsNullOrWhiteSpace(Subtitle))
{
@Subtitle
}
@ChildContent
}
@code {
[Parameter] public bool Open { get; set; }
[Parameter] public EventCallback OpenChanged { get; set; }
[Parameter] public string? Title { get; set; }
[Parameter] public string? Subtitle { get; set; }
/// Sheet di compilazione (~92% dello schermo) invece che di consultazione.
[Parameter] public bool Tall { get; set; }
[Parameter] public RenderFragment? ChildContent { get; set; }
private async Task Close()
{
Open = false;
await OpenChanged.InvokeAsync(false);
}
}