Render format and type selects on the same line

With the exception of mobile, where the stacked layout still makes
sense.
This commit is contained in:
Claudio Ortolina
2024-10-03 20:10:51 +01:00
parent 6584364c2b
commit 995ec3f624
@@ -26,20 +26,22 @@ defmodule MusicLibraryWeb.RecordLive.FormComponent do
phx-change="validate" phx-change="validate"
phx-submit="save" phx-submit="save"
> >
<.input <div class="sm:columns-2">
field={@form[:type]} <.input
type="select" field={@form[:type]}
label="Type" type="select"
prompt="Choose a value" label="Type"
options={Ecto.Enum.values(MusicLibrary.Records.Record, :type)} prompt="Choose a value"
/> options={Ecto.Enum.values(MusicLibrary.Records.Record, :type)}
<.input />
field={@form[:format]} <.input
type="select" field={@form[:format]}
label="Format" type="select"
prompt="Choose a value" label="Format"
options={Ecto.Enum.values(MusicLibrary.Records.Record, :format)} prompt="Choose a value"
/> options={Ecto.Enum.values(MusicLibrary.Records.Record, :format)}
/>
</div>
<.input field={@form[:release]} type="text" label="Release" /> <.input field={@form[:release]} type="text" label="Release" />
<div> <div>
<.label for={@uploads.cover_data.ref}> <.label for={@uploads.cover_data.ref}>