mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 15:38:00 +00:00
Refactor components (#80)
This commit is contained in:
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>
|
||||
Reference in new issue
Block a user