diff --git a/.formatter.exs b/.formatter.exs index 1483505..1e7574a 100644 --- a/.formatter.exs +++ b/.formatter.exs @@ -1,7 +1,10 @@ # Used by "mix format" [ import_deps: [:phoenix, :surface], - plugins: [Phoenix.LiveView.HTMLFormatter], + plugins: [ + Phoenix.LiveView.HTMLFormatter, + Surface.Formatter.Plugin + ], line_length: 115, inputs: [ "{mix,.formatter}.exs", diff --git a/lib/surface/components/form.ex b/lib/surface/components/form.ex index da75b7b..c2333c6 100644 --- a/lib/surface/components/form.ex +++ b/lib/surface/components/form.ex @@ -101,7 +101,7 @@ defmodule Surface.Components.Form do ~F""" <.form :let={form} for={@for} action={@action} {...@opts}> - <#slot {@default, form: form} context_put={__MODULE__, form: form}/> + <#slot {@default, form: form} context_put={__MODULE__, form: form} /> """ end diff --git a/lib/surface/components/form/field.ex b/lib/surface/components/form/field.ex index b135c9b..1511adb 100644 --- a/lib/surface/components/form/field.ex +++ b/lib/surface/components/form/field.ex @@ -23,7 +23,7 @@ defmodule Surface.Components.Form.Field do def render(assigns) do ~F"""
- <#slot context_put={__MODULE__, field: @name}/> + <#slot context_put={__MODULE__, field: @name} />
""" end diff --git a/lib/surface/components/form/field_context.ex b/lib/surface/components/form/field_context.ex index c403df0..f2c3431 100644 --- a/lib/surface/components/form/field_context.ex +++ b/lib/surface/components/form/field_context.ex @@ -20,6 +20,6 @@ defmodule Surface.Components.Form.FieldContext do slot default, required: true def render(assigns) do - ~F[<#slot context_put={Field, field: @name}/>] + ~F[<#slot context_put={Field, field: @name} />] end end diff --git a/lib/surface/components/form/input.ex b/lib/surface/components/form/input.ex index e5b4818..3fe4ab7 100644 --- a/lib/surface/components/form/input.ex +++ b/lib/surface/components/form/input.ex @@ -84,7 +84,7 @@ defmodule Surface.Components.Form.Input do field = Context.get(assigns, Surface.Components.Form.Field, :field) ~F""" - <#slot {@default, form: @assigns[:form] || form, field: @assigns[:field] || field}/> + <#slot {@default, form: @assigns[:form] || form, field: @assigns[:field] || field} /> """ end end diff --git a/lib/surface/components/form/inputs.ex b/lib/surface/components/form/inputs.ex index 9ac1136..62774ce 100644 --- a/lib/surface/components/form/inputs.ex +++ b/lib/surface/components/form/inputs.ex @@ -38,7 +38,7 @@ defmodule Surface.Components.Form.Inputs do def render(assigns) do ~F""" <.inputs_for :let={nested_form} field={@form[@for || @field]} {...@opts}> - <#slot {@default, form: nested_form, index: nested_form.index } context_put={Form, form: nested_form} /> + <#slot {@default, form: nested_form, index: nested_form.index} context_put={Form, form: nested_form} /> """ end diff --git a/lib/surface/components/form/label.ex b/lib/surface/components/form/label.ex index 8ec5b62..acafae1 100644 --- a/lib/surface/components/form/label.ex +++ b/lib/surface/components/form/label.ex @@ -54,7 +54,7 @@ defmodule Surface.Components.Form.Label do assigns = assign(assigns, opts: opts) ~F""" -