Improve layout and spacing for notes and forms

This commit is contained in:
Claudio Ortolina
2025-09-06 12:08:13 +03:00
parent 87ce6fe8a9
commit d6261e12c1
2 changed files with 3 additions and 3 deletions
@@ -45,7 +45,7 @@ defmodule MusicLibraryWeb.CoreComponents do
def simple_form(assigns) do def simple_form(assigns) do
~H""" ~H"""
<.form :let={f} for={@for} as={@as} {@rest}> <.form :let={f} for={@for} as={@as} {@rest}>
<div class="mt-10 space-y-8 bg-white dark:bg-zinc-800"> <div class="mt-5 space-y-8 bg-white dark:bg-zinc-800">
{render_slot(@inner_block, f)} {render_slot(@inner_block, f)}
<div :for={action <- @actions} class="mt-2 flex items-center justify-between gap-6"> <div :for={action <- @actions} class="mt-2 flex items-center justify-between gap-6">
{render_slot(action, f)} {render_slot(action, f)}
@@ -28,7 +28,7 @@ defmodule MusicLibraryWeb.NotesComponent do
class="min-w-xs max-w-lg sm:min-w-lg lg:min-w-2xl py-16" class="min-w-xs max-w-lg sm:min-w-lg lg:min-w-2xl py-16"
> >
<.tabs> <.tabs>
<.tabs_list variant="segmented" active_tab={@mode}> <.tabs_list variant="segmented" class="w-32" active_tab={@mode}>
<:tab name="read" phx-click="set_mode" phx-value-mode="read" phx-target={@myself}> <:tab name="read" phx-click="set_mode" phx-value-mode="read" phx-target={@myself}>
{gettext("Read")} {gettext("Read")}
</:tab> </:tab>
@@ -37,7 +37,7 @@ defmodule MusicLibraryWeb.NotesComponent do
</:tab> </:tab>
</.tabs_list> </.tabs_list>
<.tabs_panel active={@mode == "read"} name="read"> <.tabs_panel active={@mode == "read"} name="read">
<div class="w-full mt-10 text-sm/8"> <div class="w-full mt-5 text-sm/8">
{render_notes(@form[:notes].value)} {render_notes(@form[:notes].value)}
</div> </div>
</.tabs_panel> </.tabs_panel>