Riddler.Screens.Type.Heading (Riddler v0.1.0)

Copy Markdown View Source

A section title: a level and the text of the heading.

level is an integer from 1 to 6 - the range every document format that has headings agrees on, and the range a renderer can map onto whatever it builds. It is a number rather than a style name because what a heading means is its depth in the document; how big it looks is the renderer's.

iex> node = %{type: "heading", key: "account_heading", level: 1, text: "Create your account"}
iex> Riddler.Screens.Type.Heading.validate(node)
[]