BlockBox.LayoutBlocks (blockbox v1.2.1)
Defines generator functions for all layout blocks.
Link to this section Summary
Functions
Creates an actions block.
Creates a context block.
Creates a divider block.
Creates an input block.
Creates a section block.
Link to this section Functions
Link to this function
actions_block(elements, opts \\ [])
Creates an actions block.
options
Options
Options are not included by default.
:block_id
- String
Link to this function
context_block(elements, opts \\ [])
Creates a context block.
options
Options
Options are not included by default.
:block_id
- String
Link to this function
divider(opts \\ [])
Creates a divider block.
options
Options
Options are not included by default.
:block_id
- String
Link to this function
file_block(external_id, source \\ "remote", opts \\ [])
Creates a file block.
options
Options
Options are not included by default.
:block_id
- String
Link to this function
image_block(image_url, alt_text, opts \\ [])
Creates an image block.
options
Options
Options are not included by default.
:title
-BlockBox.CompositionObjects.plain_text_object/0
or String:block_id
- String
Link to this function
input(label, element, opts \\ [])
@spec input( String.t() | BlockBox.CompositionObjects.plain_text_object(), map(), keyword() ) :: map()
Creates an input block.
options
Options
Options are not included by default.
:block_id
- String:hint
-BlockBox.CompositionObjects.plain_text_object/0
or String:optional
- boolean
Link to this function
section(text, opts \\ [])
@spec section( String.t() | BlockBox.CompositionObjects.text_object(), keyword() ) :: map()
Creates a section block.
options
Options
Options are not included by default.
:block_id
- string:fields
- list ofBlockBox.CompositionObjects.text_object/0
s:accessory
- any element fromBlockBox.BlockElements