Skip to content
This repository has been archived by the owner on Feb 19, 2025. It is now read-only.

Commit

Permalink
docs: fix example presentation in hexdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonmestevao committed Feb 20, 2024
1 parent b0a3bb3 commit 1a52f13
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions lib/custom.ex
Original file line number Diff line number Diff line change
Expand Up @@ -511,14 +511,18 @@ defmodule Tails.Custom do
And then we merge the whole list up into one class string.
This allows for conditional class rendering, arbitrarily nested. For example:
iex> classes(["a", "b"])
"a b"
iex> classes([a: false, b: true])
"b"
iex> classes([[a: true, b: false], [c: false, d: true]])
"a d"
This allows for conditional class rendering, arbitrarily nested.
## Examples
iex> classes(["a", "b"])
"a b"
iex> classes([a: false, b: true])
"b"
iex> classes([[a: true, b: false], [c: false, d: true]])
"a d"
"""
def classes(nil), do: nil

Expand Down

0 comments on commit 1a52f13

Please sign in to comment.