Docs and cleanup
This commit is contained in:
parent
f0cf03141b
commit
22a7fd9c6d
13 changed files with 159 additions and 74 deletions
|
|
@ -29,6 +29,7 @@ defmodule BirdyChatWeb.CoreComponents do
|
|||
use Phoenix.Component
|
||||
use Gettext, backend: BirdyChatWeb.Gettext
|
||||
|
||||
alias Phoenix.HTML.Form
|
||||
alias Phoenix.LiveView.JS
|
||||
|
||||
@doc """
|
||||
|
|
@ -200,9 +201,7 @@ defmodule BirdyChatWeb.CoreComponents do
|
|||
|
||||
def input(%{type: "checkbox"} = assigns) do
|
||||
assigns =
|
||||
assign_new(assigns, :checked, fn ->
|
||||
Phoenix.HTML.Form.normalize_value("checkbox", assigns[:value])
|
||||
end)
|
||||
assign_new(assigns, :checked, fn -> Form.normalize_value("checkbox", assigns[:value]) end)
|
||||
|
||||
~H"""
|
||||
<div class="fieldset mb-2">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue