Hide button text on mobile

This commit is contained in:
Claudio Ortolina
2026-04-13 12:53:57 +01:00
parent 54dab5fbdf
commit 5512ac0837
2 changed files with 7 additions and 5 deletions
@@ -38,7 +38,7 @@ defmodule MusicLibraryWeb.CollectionLive.Index do
patch={~p"/collection/import"} patch={~p"/collection/import"}
> >
<.icon name="hero-plus" class="icon" aria-hidden="true" data-slot="icon" /> <.icon name="hero-plus" class="icon" aria-hidden="true" data-slot="icon" />
{gettext("Add")} <span class="sr-only sm:not-sr-only">{gettext("Add")}</span>
</.button> </.button>
<.button <.button
variant="solid" variant="solid"
@@ -46,7 +46,7 @@ defmodule MusicLibraryWeb.CollectionLive.Index do
patch={~p"/collection/scan"} patch={~p"/collection/scan"}
> >
<.barcode_icon class="icon fill-current" /> <.barcode_icon class="icon fill-current" />
{gettext("Scan")} <span class="sr-only sm:not-sr-only">{gettext("Scan")}</span>
</.button> </.button>
<.button <.button
variant="solid" variant="solid"
@@ -59,8 +59,10 @@ defmodule MusicLibraryWeb.CollectionLive.Index do
aria-hidden="true" aria-hidden="true"
data-slot="icon" data-slot="icon"
/> />
{gettext("Chat")} <span class="sr-only sm:not-sr-only">{gettext("Chat")}</span>
<span :if={@chat_count > 0} class="text-xs font-medium">{@chat_count}</span> <span :if={@chat_count > 0} class="sr-only sm:not-sr-only text-xs font-medium">
{@chat_count}
</span>
</.button> </.button>
</.button_group> </.button_group>
</div> </div>
@@ -34,7 +34,7 @@ defmodule MusicLibraryWeb.WishlistLive.Index do
patch={~p"/wishlist/import"} patch={~p"/wishlist/import"}
> >
<.icon name="hero-plus" class="icon" aria-hidden="true" data-slot="icon" /> <.icon name="hero-plus" class="icon" aria-hidden="true" data-slot="icon" />
{gettext("Add")} <span class="sr-only sm:not-sr-only">{gettext("Add")}</span>
</.button> </.button>
</div> </div>
</header> </header>