diff --git a/app/assets/tailwind.config.js b/app/assets/tailwind.config.js index bed44ab..068649f 100644 --- a/app/assets/tailwind.config.js +++ b/app/assets/tailwind.config.js @@ -14,12 +14,12 @@ module.exports = { theme: { extend: { colors: { - brand: "#FD4F00", + brand: "#aa31f6", } }, }, plugins: [ - require("@tailwindcss/forms"), + // require("@tailwindcss/forms"), // Allows prefixing tailwind classes with LiveView classes to add rules // only when LiveView classes are applied, for example: // diff --git a/app/lib/prymn_web/components/core_components.ex b/app/lib/prymn_web/components/core_components.ex index 6735c66..9cd5dd2 100644 --- a/app/lib/prymn_web/components/core_components.ex +++ b/app/lib/prymn_web/components/core_components.ex @@ -189,7 +189,7 @@ defmodule PrymnWeb.CoreComponents do def simple_form(assigns) do ~H""" <.form :let={f} for={@for} as={@as} {@rest}> -
+
<%= render_slot(@inner_block, f) %>
<%= render_slot(action, f) %> @@ -227,6 +227,7 @@ defmodule PrymnWeb.CoreComponents do attr :id, :any, default: nil attr :name, :any attr :label, :string, default: nil + attr :placeholder, :string, default: nil attr :value, :any attr :type, :string, @@ -286,18 +287,21 @@ defmodule PrymnWeb.CoreComponents do def input(%{type: "select"} = assigns) do ~H""" -
- <.label for={@id}><%= @label %> +
+ <.label errors={@errors} for={@id}><%= @label %> <.error :for={msg <- @errors}><%= msg %>
""" @@ -326,21 +330,23 @@ defmodule PrymnWeb.CoreComponents do # All other inputs text, datetime-local, url, password, etc. are handled here... def input(assigns) do ~H""" -
- <.label for={@id}><%= @label %> +
+ <.label errors={@errors} for={@id}><%= @label %> <.error :for={msg <- @errors}><%= msg %>
""" @@ -350,11 +356,20 @@ defmodule PrymnWeb.CoreComponents do Renders a label. """ attr :for, :string, default: nil + attr :errors, :list, default: [] slot :inner_block, required: true def label(assigns) do ~H""" -