mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-06-27 15:56:28 +00:00
added IconSize parameter to enum selection
This commit is contained in:
parent
5d11f7dbd7
commit
57bebfe1b1
@ -2,7 +2,7 @@
|
|||||||
@inherits EnumSelectionBase
|
@inherits EnumSelectionBase
|
||||||
|
|
||||||
<MudStack Row="@true" Class="mb-3">
|
<MudStack Row="@true" 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">
|
<MudSelect T="@T" Value="@this.Value" ValueChanged="@this.SelectionChanged" AdornmentIcon="@this.Icon" Adornment="Adornment.Start" IconSize="@this.IconSize" Label="@this.Label" Variant="Variant.Outlined" Margin="Margin.Dense" Validation="@this.ValidateSelection">
|
||||||
@foreach (var value in Enum.GetValues<T>())
|
@foreach (var value in Enum.GetValues<T>())
|
||||||
{
|
{
|
||||||
<MudSelectItem Value="@value">
|
<MudSelectItem Value="@value">
|
||||||
|
|||||||
@ -39,6 +39,9 @@ public partial class EnumSelection<T> : EnumSelectionBase where T : struct, Enum
|
|||||||
[Parameter]
|
[Parameter]
|
||||||
public string Icon { get; set; } = Icons.Material.Filled.ArrowDropDown;
|
public string Icon { get; set; } = Icons.Material.Filled.ArrowDropDown;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public Size IconSize { get; set; } = Size.Medium;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the custom name function for selecting the display name of an enum value.
|
/// Gets or sets the custom name function for selecting the display name of an enum value.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user