We're seeing the following error when compiling our app with --warnings-as-errors:
Compiling 103 files (.ex)
warning: undefined attribute "checked_value" for component PetalComponents.Form.switch/1
lib/colife_web/live/profile_live/show.ex:153: (file)
warning: undefined attribute "unchecked_value" for component PetalComponents.Form.switch/1
lib/colife_web/live/profile_live/show.ex:153: (file)
Compilation failed due to warnings while using the --warnings-as-errors option
We're seeing the following error when compiling our app with
--warnings-as-errors
:I've tracked it down to
attr :rest
in theswitch
component https://github.com/petalframework/petal_components/blob/main/lib/petal_components/form.ex#L598 not accepting the same values as thecheckbox
component https://github.com/petalframework/petal_components/blob/main/lib/petal_components/form.ex#L527-L529, when both call https://hexdocs.pm/phoenix_html/Phoenix.HTML.Form.html#checkbox/3-options.Cheers.