Skip to content

Commit

Permalink
Update inconsistent core_component select input class (#6048)
Browse files Browse the repository at this point in the history
  • Loading branch information
suciptoid authored Jan 26, 2025
1 parent 385b0e1 commit 042ce91
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion installer/templates/phx_web/components/core_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,11 @@ defmodule <%= @web_namespace %>.CoreComponents do
<select
id={@id}
name={@name}
class="mt-2 block w-full rounded-md border border-zinc-300 bg-white shadow-sm focus:border-zinc-400 focus:ring-0 sm:text-sm"
class={[
"mt-2 block w-full rounded-lg text-zinc-900 focus:ring-0 sm:text-sm sm:leading-6",
@errors == [] && "border-zinc-300 focus:border-zinc-400",
@errors != [] && "border-rose-400 focus:border-rose-400"
]}
multiple={@multiple}
{@rest}
>
Expand Down
6 changes: 5 additions & 1 deletion priv/templates/phx.gen.live/core_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,11 @@ defmodule <%= @web_namespace %>.CoreComponents do
<select
id={@id}
name={@name}
class="mt-2 block w-full rounded-md border border-zinc-300 bg-white shadow-sm focus:border-zinc-400 focus:ring-0 sm:text-sm"
class={[
"mt-2 block w-full rounded-lg text-zinc-900 focus:ring-0 sm:text-sm sm:leading-6",
@errors == [] && "border-zinc-300 focus:border-zinc-400",
@errors != [] && "border-rose-400 focus:border-rose-400"
]}
multiple={@multiple}
{@rest}
>
Expand Down

0 comments on commit 042ce91

Please sign in to comment.