blocks: An enclosure for all HTML block functions

View source: R/blocks.R

blocksR Documentation

An enclosure for all HTML block functions

Description

To contain all of the block-based HTML ⁠block_*()⁠ calls, we should use the blocks() function. We can pass the resulting blocks object to either of the body, header, and footer arguments of compose_email().

Usage

blocks(...)

Arguments

...

One or more ⁠block_*()⁠ calls.

Examples

# This is an example of how a
# title and text looks in each of
# the three content areas
email <-
  compose_email(
    header =
      blocks(
        block_title("This is a Title in the **Header**"),
        block_text("This is text in the **Header**.")
      ),
    body =
      blocks(
        block_title("This is a Title in the **Body**"),
        block_text("This is text in the **Body**.")
      ),
    footer =
      blocks(
        block_title("This is a Title in the **Footer**"),
        block_text("This is text in the **Footer**.")
      )
  )

if (interactive()) email


blastula documentation built on May 29, 2024, 4:22 a.m.

Related to blocks in blastula...