cannery/lib/cannery_web/live/tag_live/form_component.html.leex
2021-09-11 18:17:02 -04:00

33 lines
991 B
Plaintext

<h2 class="title text-xl text-primary-500">
<%= @title %>
</h2>
<%= f = form_for @changeset, "#",
id: "tag-form",
class: "grid grid-cols-3 justify-center items-center space-y-4",
phx_target: @myself,
phx_change: "validate",
phx_submit: "save" %>
<%= label f, :name, class: "title text-lg text-primary-500" %>
<%= text_input f, :name, class: "input input-primary col-span-2" %>
<span class="col-span-3">
<%= error_tag f, :name %>
</span>
<%= label f, :bg_color, class: "title text-lg text-primary-500" %>
<%= color_input f, :bg_color, class: "mx-auto col-span-2" %>
<span class="col-span-3">
<%= error_tag f, :bg_color %>
</span>
<%= label f, :text_color, class: "title text-lg text-primary-500" %>
<%= color_input f, :text_color, class: "mx-auto col-span-2" %>
<span class="col-span-3">
<%= error_tag f, :text_color %>
</span>
<%= submit "Save", class: "mx-auto btn btn-primary col-span-3",
phx_disable_with: "Saving..." %>
</form>