Expresso.Element.Item (expresso v0.1.0)

Copy Markdown View Source

An item of a list

The item entity takes its text as its first argument, and it can hold one nested list. Expresso.Element.List gives the rules of a list.

Summary

Types

t()

The struct of an item

Functions

Make the assigns of the render function from the struct

Make the HTML of an item

Types

t()

@type t() :: %Expresso.Element.Item{
  __spark_metadata__: term(),
  at: term(),
  class: term(),
  easing: term(),
  effect: term(),
  el: term(),
  elements: term(),
  goto: term(),
  morph: term(),
  on: term(),
  signature: term(),
  speed: term(),
  steps: term(),
  text: term()
}

The struct of an item

Functions

get_assigns(item)

@spec get_assigns(t()) :: map()

Make the assigns of the render function from the struct

The key overlay holds the attributes of the overlay contract, from Expresso.Overlay.Render.attributes/1. The key goto holds the link of the goto option, or nil. The key text holds the text with the ids and the style rules of this copy in each inline SVG, from Expresso.SvgCopy.copy_each/1.

render(assigns)

@spec render(map()) :: Phoenix.HTML.safe()

Make the HTML of an item

The text goes into one block element, as in Expresso.Element.TextArea, and each nested list comes after it. With the goto option, the text goes into a link, and a nested list stays outside the link.