mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2024-11-23 19:42:51 +01:00
25 lines
540 B
Plaintext
25 lines
540 B
Plaintext
@using Phantom.Web.Components.Utils
|
|
@if (Label != null) {
|
|
<label for="@Id" class="form-label">@Label</label>
|
|
}
|
|
else if (LabelFragment != null) {
|
|
<label for="@Id" class="form-label">@LabelFragment</label>
|
|
}
|
|
|
|
@code {
|
|
|
|
[Parameter, EditorRequired]
|
|
public string Id { get; set; } = null!;
|
|
|
|
[Parameter]
|
|
public string? Label { get; set; }
|
|
|
|
[Parameter]
|
|
public RenderFragment? LabelFragment { get; set; }
|
|
|
|
protected override void OnParametersSet() {
|
|
BlazorUtils.RequireEitherParameterIsSet(Label, LabelFragment);
|
|
}
|
|
|
|
}
|