# `WardrikSlack.Blocks`

Builds the Block Kit blocks of Wardrik's Slack messages.

# `actions`

```elixir
@spec actions(String.t(), [map()]) :: map()
```

Returns an `actions` block of `elements`, such as buttons.

# `button`

```elixir
@spec button(String.t(), String.t(), String.t(), String.t() | nil) :: map()
```

Returns a button that sends `value` under `action_id`. `style` is `"primary"`, `"danger"` or `nil`.

# `clip`

```elixir
@spec clip(String.t(), pos_integer()) :: String.t()
```

Returns `text` cut to `max` characters. Cut text ends in `…`.

# `context`

```elixir
@spec context(String.t()) :: map()
```

Returns a line of small `mrkdwn` text.

# `ephemeral`

```elixir
@spec ephemeral(String.t()) :: map()
```

Returns a reply to a button press that only the person who pressed sees.

# `markdown`

```elixir
@spec markdown(String.t()) :: map()
```

Returns a `markdown` block, clipped to Slack's limit. Models write this kind of Markdown.

# `plain`

```elixir
@spec plain(String.t()) :: map()
```

Returns a `plain_text` object, as buttons and options take.

# `section`

```elixir
@spec section(String.t()) :: map()
```

Returns a section of `mrkdwn` text.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
