Skip to content

Commit 042ce91

Browse files
authored
Update inconsistent core_component select input class (#6048)
1 parent 385b0e1 commit 042ce91

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

installer/templates/phx_web/components/core_components.ex

+5-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,11 @@ defmodule <%= @web_namespace %>.CoreComponents do
267267
<select
268268
id={@id}
269269
name={@name}
270-
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"
270+
class={[
271+
"mt-2 block w-full rounded-lg text-zinc-900 focus:ring-0 sm:text-sm sm:leading-6",
272+
@errors == [] && "border-zinc-300 focus:border-zinc-400",
273+
@errors != [] && "border-rose-400 focus:border-rose-400"
274+
]}
271275
multiple={@multiple}
272276
{@rest}
273277
>

priv/templates/phx.gen.live/core_components.ex

+5-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,11 @@ defmodule <%= @web_namespace %>.CoreComponents do
267267
<select
268268
id={@id}
269269
name={@name}
270-
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"
270+
class={[
271+
"mt-2 block w-full rounded-lg text-zinc-900 focus:ring-0 sm:text-sm sm:leading-6",
272+
@errors == [] && "border-zinc-300 focus:border-zinc-400",
273+
@errors != [] && "border-rose-400 focus:border-rose-400"
274+
]}
271275
multiple={@multiple}
272276
{@rest}
273277
>

0 commit comments

Comments
 (0)