Skip to content

Commit

Permalink
make select classes overrideable
Browse files Browse the repository at this point in the history
  • Loading branch information
taylordowns2000 committed Aug 14, 2024
1 parent 4ee43fa commit 33050da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/lightning_web/live/components/form.ex
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,8 @@ defmodule LightningWeb.Components.Form do
"""
end

attr :class, :any, default: ""

def select(assigns) do
select_classes = ~w[
block
Expand All @@ -448,7 +450,7 @@ defmodule LightningWeb.Components.Form do
focus:ring-primary-200
focus:ring-opacity-50
disabled:cursor-not-allowed
]
] ++ List.wrap(assigns.class)

opts = assigns_to_attributes(assigns) ++ [class: select_classes]

Expand Down

0 comments on commit 33050da

Please sign in to comment.