Improve show record interface

Use a single column layout on mobile, with centered buttons.
This commit is contained in:
Claudio Ortolina
2024-09-30 09:40:26 +01:00
parent c58f783e9e
commit 547195e455
2 changed files with 17 additions and 7 deletions
@@ -427,7 +427,10 @@ defmodule MusicLibraryWeb.CoreComponents do
def header(assigns) do
~H"""
<header class={[@actions != [] && "flex items-center justify-between gap-6 mb-2", @class]}>
<header class={[
@actions != [] && "sm:flex sm:items-center sm:justify-between sm:gap-6 mb-2",
@class
]}>
<div>
<h1 class="text-lg font-semibold leading-8 text-zinc-800">
<%= render_slot(@inner_block) %>
@@ -436,7 +439,7 @@ defmodule MusicLibraryWeb.CoreComponents do
<%= render_slot(@subtitle) %>
</p>
</div>
<div class="flex-none"><%= render_slot(@actions) %></div>
<div class="flex justify-center gap-2 sm:flex-none mt-2 mb-2"><%= render_slot(@actions) %></div>
</header>
"""
end