Duplo v0.1.1 Duplo.Attr View Source
Link to this section Summary
Link to this section Functions
Link to this function
attr(arg) View Source
Format an attribute to be output in HTML. It dashes the key ("HelloWorld" key becomes "hello-world") and sanitize the value
## Examples
iex> Duplo.Attr.attr({:class, "btn btn-xs btn-primary"})
"class=\"btn btn-xs btn-primary\""
iex> Duplo.Attr.attr({"style", "background-color: red;"})
"style=\"background-color: red;\""