Nitroux.Utils (nitroux v0.3.3)

Link to this section Summary

Functions

Generates dynamic open and closing tags around content iex> Nitroux.Utils.tag("div", ["hello", " ", "world"]) "<div>hello world</div>"

Link to this section Types

Specs

tag() :: String.t()

Link to this section Functions

Link to this function

tag(name, attrs, container \\ true)

Specs

tag(any(), Nitroux.Types.GlobalAttributes.t() | [tag()] | tag(), any()) ::
  <<_::24, _::_*8>>

Generates dynamic open and closing tags around content iex> Nitroux.Utils.tag("div", ["hello", " ", "world"]) "<div>hello world</div>"

Nitroux.Utils.tag("div", []) "<div></div>"

Nitroux.Utils.tag("div", [html: "hello world"]) "<div>hello world</div>"

Nitroux.Utils.tag("div", [class: "test", html: "hello world"]) "<div class="test">hello world</div>"