@* A bordered box with a title: docs, dialog bodies, grouped controls. *@
@if (Legend is not null || LegendContent is not null || LegendId is not null) { @if (LegendContent is not null) { @LegendContent } else { @Legend } } @ChildContent
@code { /// Plain text title. Ignored when is set. [Parameter] public string? Legend { get; set; } /// Title markup, for when the legend holds more than text. [Parameter] public RenderFragment? LegendContent { get; set; } /// Set when script needs to fill the legend in at runtime. [Parameter] public string? LegendId { get; set; } [Parameter] public RenderFragment? ChildContent { get; set; } }