A block of code in mono, given as the code attribute. lang: :heex colours it (components, slots, attributes,
strings, expressions, comments) through DevactionUI.Highlight. tone: :dark is the ink block of a suggestion; :risk and :ok are the
"your code" and "idiomatic" blocks of a lesson, tinted red and green. It keeps its own line breaks and
scrolls sideways instead of widening the page.
Summary
Functions
Attributes
tone(:atom) - Defaults to:dark. Must be one of:dark,:risk,:ok, or:neutral.label(:string) - a mono caption above the block. Defaults tonil.lang(:atom) -:heexcolours the code by what each part of the template is. Defaults tonil. Must be one ofnil, or:heex.class(:any) - Defaults tonil.code(:string) (required) - the code as text: aprekeeps every space, so it never comes from a slot.- Global attributes are accepted.