PhxComponentHelpers.set_data_attributes
You're seeing just the function
set_data_attributes
, go back to PhxComponentHelpers module for more information.
Extends assigns with html_* data-attributes that can be interpolated within your component markup.
Behaves exactly like set_component_attributes/3
excepted the output @html_attr
assigns contain data-attributes markup.
Example
assigns
|> set_data_attributes([:key, :text], required: [:key])
|> set_data_attributes([:document], json: true)
assigns
now contains @html_key
, @html_text
and @html_document
.