@* Sets the title of the tab that holds the page (SPEC §10.2); the layout writes the browser title from the active
tab. Outside a tab (sign-in pages) it writes the browser title itself. *@
@if (Tab is null)
{
@Text · @T["Common.ProductName"]
}
@code {
/// The tab of the page, given by the tab host.
[CascadingParameter]
public KhTab? Tab { get; set; }
/// The title.
[Parameter, EditorRequired]
public string Text { get; set; } = string.Empty;
/// The icon of the tab, or for the menu icon.
[Parameter]
public string? Icon { get; set; }
///
protected override void OnParametersSet() => Tab?.SetTitle(Text, Icon);
}