Improve layout and spacing for notes and forms
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user