-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathSelectExtendedExample2.razor
More file actions
62 lines (58 loc) · 3.24 KB
/
SelectExtendedExample2.razor
File metadata and controls
62 lines (58 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
@namespace MudExtensions.Docs.Examples
<MudGrid>
<MudItem xs="12" sm="8" Class="d-flex align-center gap-2">
<MudSelectExtended Dense="true" T="string" Label="Coffee" Variant="Variant.Text" Color="_color" AnchorOrigin="Origin.BottomCenter">
<MudSelectItemExtended Value="@("Tyrannosaur")" />
<MudSelectItemExtended Value="@("Triceratops")" />
<MudSelectItemExtended Value="@("Mike Rex")" />
</MudSelectExtended>
<MudSelectExtended Dense="true" T="string" Label="Coffee" Variant="Variant.Outlined" Color="_color" AnchorOrigin="Origin.BottomCenter">
<MudSelectItemExtended Value="@("Tyrannosaur")" />
<MudSelectItemExtended Value="@("Triceratops")" />
<MudSelectItemExtended Value="@("Henon Rex")" />
</MudSelectExtended>
<MudSelectExtended Dense="true" T="string" Label="Coffee" Variant="Variant.Filled" Color="_color" AnchorOrigin="Origin.BottomCenter">
<MudSelectItemExtended Value="@("Tyrannosaur")" />
<MudSelectItemExtended Value="@("Triceratops")" />
<MudSelectItemExtended Value="@("Benno Rex")" />
</MudSelectExtended>
<MudSelectExtended @bind-SelectedValues="@_stateValues" Label="US States" MultiSelection="true" Color="_color">
@foreach (var state in states)
{
<MudSelectItemExtended T="string" Value="@state">@state</MudSelectItemExtended>
}
</MudSelectExtended>
</MudItem>
<MudItem xs="12" sm="4">
<MudRadioGroup T="Color" @bind-Value="_color" Class="d-flex flex-column">
<MudRadio Value="Color.Primary" Color="Color.Primary">Primary</MudRadio>
<MudRadio Value="Color.Secondary" Color="Color.Secondary">Secondary</MudRadio>
<MudRadio Value="Color.Tertiary" Color="Color.Tertiary">Tertiary</MudRadio>
<MudRadio Value="Color.Info" Color="Color.Info">Info</MudRadio>
<MudRadio Value="Color.Success" Color="Color.Success">Success</MudRadio>
<MudRadio Value="Color.Warning" Color="Color.Warning">Warning</MudRadio>
<MudRadio Value="Color.Error" Color="Color.Error">Error</MudRadio>
</MudRadioGroup>
</MudItem>
</MudGrid>
@code{
private Color _color = Color.Primary;
private IEnumerable<string?> _stateValues;
private string[] states =
{
"Alabama", "Alaska", "American Samoa", "Arizona",
"Arkansas", "California", "Colorado", "Connecticut",
"Delaware", "District of Columbia", "Federated States of Micronesia",
"Florida", "Georgia", "Guam", "Hawaii", "Idaho",
"Illinois", "Indiana", "Iowa", "Kansas", "Kentucky",
"Louisiana", "Maine", "Marshall Islands", "Maryland",
"Massachusetts", "Michigan", "Minnesota", "Mississippi",
"Missouri", "Montana", "Nebraska", "Nevada",
"New Hampshire", "New Jersey", "New Mexico", "New York",
"North Carolina", "North Dakota", "Northern Mariana Islands", "Ohio",
"Oklahoma", "Oregon", "Palau", "Pennsylvania", "Puerto Rico",
"Rhode Island", "South Carolina", "South Dakota", "Tennessee",
"Texas", "Utah", "Vermont", "Virgin Island", "Virginia",
"Washington", "West Virginia", "Wisconsin", "Wyoming",
};
}