mirror of
				https://github.com/lantean-code/qbtmud.git
				synced 2025-11-03 21:43:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			37 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
using Microsoft.AspNetCore.Components;
 | 
						|
 | 
						|
namespace Lantean.QBTMud.Components.UI
 | 
						|
{
 | 
						|
    public partial class FieldSwitch
 | 
						|
    {
 | 
						|
        /// <inheritdoc cref="MudBlazor.MudBooleanInput{T}.Value"/>
 | 
						|
        [Parameter]
 | 
						|
        public bool Value { get; set; }
 | 
						|
 | 
						|
        /// <inheritdoc cref="MudBlazor.MudBooleanInput{T}.ValueChanged"/>
 | 
						|
        [Parameter]
 | 
						|
        public EventCallback<bool> ValueChanged { get; set; }
 | 
						|
 | 
						|
        /// <inheritdoc cref="MudBlazor.MudField.Label"/>
 | 
						|
        [Parameter]
 | 
						|
        public string? Label { get; set; }
 | 
						|
 | 
						|
        /// <inheritdoc cref="MudBlazor.MudBooleanInput{T}.Disabled"/>
 | 
						|
        [Parameter]
 | 
						|
        public bool Disabled { get; set; }
 | 
						|
 | 
						|
        /// <inheritdoc cref="MudBlazor.MudFormComponent{T}.Validation"/>
 | 
						|
        [Parameter]
 | 
						|
        public object? Validation { get; set; }
 | 
						|
 | 
						|
        /// <inheritdoc cref="MudBlazor.MudField.HelperText"/>
 | 
						|
        [Parameter]
 | 
						|
        public string? HelperText { get; set; }
 | 
						|
 | 
						|
        protected async Task ValueChangedCallback(bool value)
 | 
						|
        {
 | 
						|
            Value = value;
 | 
						|
            await ValueChanged.InvokeAsync(value);
 | 
						|
        }
 | 
						|
    }
 | 
						|
} |