Skip to content

Commit

Permalink
docs: fix example presentation in hexdocs (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonmestevao authored Feb 20, 2024
1 parent b0a3bb3 commit e921ce2
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 e921ce2

Please sign in to comment.