@if(Title is not null) {

@Title


} @ChildContent
@code { [Parameter] public string? Title { get; set; } [Parameter] public RenderFragment ChildContent { get; set; } public bool Visible { get => visible; set { visible = value; StateHasChanged(); } } [Parameter] public int HeightPixels { set => height = $"{value}px"; } [Parameter] public int HeightPercent { set => height = $"{value}%"; } public void Show() => Visible = true; public void Hide() => Visible = false; private bool visible = false; private string? height; private string style => $"{(height is null ? "" : $"max-height:{height};")}"; }