Hover color on the delete buttons
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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" : "";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user