Update the style for AuthorRoles' nested forms for the Book's form.

This commit is contained in:
2025-04-20 18:17:12 +03:00
parent 289ff4855c
commit 99ae616eff
2 changed files with 5 additions and 3 deletions
@@ -4,6 +4,7 @@ defmodule DecentralisedBookIndexWeb.Components.MyComponents.SelectedAuthor do
attr :author_form, :map, default: nil
attr :form_path, :string, default: ""
attr :class, :string, default: ""
def selected_author(assigns) do
author_id = assigns.author_form.value
@@ -18,7 +19,7 @@ defmodule DecentralisedBookIndexWeb.Components.MyComponents.SelectedAuthor do
assigns = assign(assigns, :author, author)
~H"""
<button type="button" phx-click="open-select-author" phx-target={@notify_component} phx-value-path={@form_path} class="text-white bg-blue-700 hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 font-medium rounded-full text-sm px-5 py-2.5 text-center me-2 mb-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
<button type="button" phx-click="open-select-author" phx-target={@notify_component} phx-value-path={@form_path} class={"text-white bg-blue-700 hover:bg-blue-800 focus:outline-none focus:ring-4 focus:ring-blue-300 font-medium rounded-full text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 #{@class}"}>
<%= if @author != nil do %>
{@author.name}
<% else %>