View Source PhxViewHelpers (phx_component_helpers v1.4.1)
PhxComponentHelpers
are helper functions meant to be used within Phoenix your views to
facilitate usage of live_components inside templates.
Summary
Functions
Extends Phoenix.Component.form/1
options to merge css class as with
PhxComponentHelpers.extend_class/2
.
Functions
Extends Phoenix.Component.form/1
options to merge css class as with
PhxComponentHelpers.extend_class/2
.
It's useful to define your own my_form
function with default css classes that still can be
overriden from the template.
Example
def my_form(options) do
new_options = extend_form_class(options, "mt-4 space-y-2")
Component.form(new_options)
end