Initial commit

This commit is contained in:
2026-07-13 09:25:40 +07:00
parent c08ff54676
commit bccfb156d7
1938 changed files with 641646 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
@using Microsoft.AspNetCore.Components.Web
<button class="icon-button @DisabledClass" @onclick="HandleClick" title="@Title" disabled="@Disabled">
<span class="mdi @IconClass"></span>
</button>
@code {
[Parameter] public string Icon { get; set; } = string.Empty;
[Parameter] public string? Title { get; set; }
[Parameter] public EventCallback<MouseEventArgs> OnClick { get; set; }
[Parameter] public bool Disabled { get; set; }
private string IconClass => $"mdi-{Icon} mdi-18px"; /* Giảm icon size để phù hợp với button nhỏ hơn */
private string DisabledClass => Disabled ? "disabled" : string.Empty;
private async Task HandleClick(MouseEventArgs e)
{
if (Disabled || !OnClick.HasDelegate)
{
return;
}
await OnClick.InvokeAsync(e);
}
}