1
0
mirror of https://github.com/chylex/Minecraft-Phantom-Panel.git synced 2024-12-22 16:42:50 +01:00
Minecraft-Phantom-Panel/Web/Phantom.Web.Components/Forms/FormSelectInput.razor

33 lines
843 B
Plaintext

@typeparam TValue
@using System.Diagnostics.CodeAnalysis
@inherits FormInputBase<TValue>
<FormLabel Id="@Id" Label="@Label" LabelFragment="@LabelFragment" />
@if (GroupContent == null) {
<InputSelect Value="@Value" ValueChanged="@ValueChanged" ValueExpression="@ValueExpression" AdditionalAttributes="@GetAttributes("form-select")">
@ChildContent
</InputSelect>
}
else {
<div class="input-group">
<InputSelect Value="@Value" ValueChanged="@ValueChanged" ValueExpression="@ValueExpression" AdditionalAttributes="@GetAttributes("form-select")">
@ChildContent
</InputSelect>
@GroupContent
</div>
}
<FormValidationMessage For="@ValueExpression" />
@code {
[Parameter]
[DisallowNull]
public RenderFragment? ChildContent { get; set; }
[Parameter]
public RenderFragment? GroupContent { get; set; }
}