Hover color on the delete buttons

This commit is contained in:
2025-12-26 14:09:49 -05:00
parent f395dba043
commit e17d15aaff
5 changed files with 14 additions and 65 deletions
@@ -30,7 +30,7 @@
Href="@($"/events/edit?id={context.Item.Id}")" />
<IconButtonWithTooltip Icon="@Icons.Material.Outlined.Delete"
TooltipText="Delete"
Color="Color.Error"
HoverColor="Color.Error"
OnClick="() => DeleteEventDefinition(context.Item!)" />
</MudStack>
</MudStack>
@@ -37,7 +37,7 @@
Href="@($"/students/edit?id={context.Item.Id}&returnUrl=/students")" />
<IconButtonWithTooltip Icon="@Icons.Material.Outlined.Delete"
TooltipText="Delete"
Color="Color.Error"
HoverColor="Color.Error"
OnClick="() => DeleteStudent(context.Item!)" />
</MudStack>
</MudStack>
+1 -1
View File
@@ -30,7 +30,7 @@
Href="@($"/teams/edit?id={context.Item.Id}")" />
<IconButtonWithTooltip Icon="@Icons.Material.Outlined.Delete"
TooltipText="Delete"
Color="Color.Error"
HoverColor="Color.Error"
OnClick="() => DeleteTeam(context.Item!)" />
</MudStack>
</MudStack>
@@ -4,6 +4,7 @@
<MudIconButton Icon="@Icon"
Size="@Size"
Color="@Color"
Class="@GetCssClass()"
Href="@Href"
OnClick="@OnClick" />
</MudTooltip>
@@ -13,6 +14,12 @@
[Parameter] public required string TooltipText { get; set; }
[Parameter] public Size Size { get; set; } = Size.Small;
[Parameter] public Color Color { get; set; } = Color.Default;
[Parameter] public Color? HoverColor { get; set; }
[Parameter] public string? Href { get; set; }
[Parameter] public EventCallback<MouseEventArgs> OnClick { get; set; }
private string GetCssClass()
{
return HoverColor == MudBlazor.Color.Error ? "icon-button-hover-error" : "";
}
}