mirror of
https://github.com/lantean-code/qbtmud.git
synced 2025-11-03 05:23:17 +00:00
Add options
This commit is contained in:
22
Lantean.QBTMudBlade/Components/MudFieldSwitch.razor.cs
Normal file
22
Lantean.QBTMudBlade/Components/MudFieldSwitch.razor.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace Lantean.QBTMudBlade.Components
|
||||
{
|
||||
public partial class MudFieldSwitch
|
||||
{
|
||||
[Parameter]
|
||||
public bool Value { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> ValueChanged { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string? Label { get; set; }
|
||||
|
||||
protected async Task ValueChangedCallback(bool value)
|
||||
{
|
||||
Value = value;
|
||||
await ValueChanged.InvokeAsync(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user