feat(web): add tooltips to icon-only action buttons

This commit is contained in:
Moritz 2026-06-08 12:35:30 +02:00
parent bec49f0771
commit 035edae522
10 changed files with 144 additions and 44 deletions

View file

@ -298,17 +298,22 @@ defmodule MvWeb.MembershipFeeSettingsLive do
<.icon name="hero-trash" class="size-4" />
</button>
</.tooltip>
<.button
<.tooltip
:if={get_member_count(mft, @member_counts) == 0}
variant="danger"
size="sm"
phx-click="delete"
phx-value-id={mft.id}
data-confirm={gettext("Are you sure?")}
aria-label={gettext("Delete Membership Fee Type")}
content={gettext("Delete Membership Fee Type")}
position="left"
>
<.icon name="hero-trash" class="size-4" />
</.button>
<.button
variant="danger"
size="sm"
phx-click="delete"
phx-value-id={mft.id}
data-confirm={gettext("Are you sure?")}
aria-label={gettext("Delete Membership Fee Type")}
>
<.icon name="hero-trash" class="size-4" />
</.button>
</.tooltip>
</:action>
</.table>
</div>