Refactor components (#80)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2024-08-21 08:30:01 +02:00
1 parent a18cb22263
commit 1d1af91f3e
137 files changed
+220 -220

No files matched your search

@@ -0,0 +1,17 @@
@typeparam T
@inherits EnumSelectionBase
<MudStack Row="@true" AlignItems="AlignItems.Center" Class="mb-3">
<MudSelect T="@T" Value="@this.Value" ValueChanged="@this.SelectionChanged" AdornmentIcon="@this.Icon" Adornment="Adornment.Start" Label="@this.Label" Variant="Variant.Outlined" Margin="Margin.Dense" Validation="@this.ValidateSelection">
@foreach (var value in Enum.GetValues<T>())
{
<MudSelectItem Value="@value">
@this.NameFunc(value)
</MudSelectItem>
}
</MudSelect>
@if (this.AllowOther && this.Value.Equals(this.OtherValue))
{
<MudTextField T="string" Text="@this.OtherInput" TextChanged="this.OtherInputChanged" Validation="@this.ValidateOther" Label="@this.LabelOther" Variant="Variant.Outlined" Margin="Margin.Dense" UserAttributes="@USER_INPUT_ATTRIBUTES" Immediate="@true"/>
}
</MudStack>