blocks: An enclosure for all HTML block functions

Description Usage Arguments Examples

View source: R/blocks.R

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

1

Arguments

...

One or more block_*() calls.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 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

rich-iannone/blastula documentation built on Oct. 17, 2020, 8:59 p.m.