Skip to content

Commit a052c3f

Browse files
committed
Update docs
1 parent 486b6ad commit a052c3f

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

assets/flagpack.eex

+9-3
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,21 @@ defmodule Flagpack do
1010

1111
You may use the `Flagpack.flag/1` function and pass a flag name.
1212

13-
<Flagpack.flag name={:usa}/>
13+
<Flagpack.flag name={:usa} />
1414
<Flagpack.flag name={:usa} class="w-5 h-5" />
1515
"""
1616
use Phoenix.Component
1717

1818
attr :class, :string, default: nil, required: false, doc: "class to be added to the component"
19-
attr :name, :atom, required: true, doc: "the name of the icon to be rendered"
19+
attr :name, :atom, required: true, doc: "the name of the flag to be rendered"
2020

21-
@doc false
21+
@doc """
22+
Renders a flag by the given name.
23+
24+
## Examples
25+
<Flagpack.flag name={:usa} />
26+
<Flagpack.flag name={:usa} class="w-5 h-5" />
27+
"""
2228
def flag(assigns) do
2329
apply(Flagpack, assigns.name, [assigns])
2430
end

lib/flagpack.ex

+9-3
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,21 @@ defmodule Flagpack do
1010

1111
You may use the `Flagpack.flag/1` function and pass a flag name.
1212

13-
<Flagpack.flag name={:usa}/>
13+
<Flagpack.flag name={:usa} />
1414
<Flagpack.flag name={:usa} class="w-5 h-5" />
1515
"""
1616
use Phoenix.Component
1717

1818
attr :class, :string, default: nil, required: false, doc: "class to be added to the component"
19-
attr :name, :atom, required: true, doc: "the name of the icon to be rendered"
19+
attr :name, :atom, required: true, doc: "the name of the flag to be rendered"
2020

21-
@doc false
21+
@doc """
22+
Renders a flag by the given name.
23+
24+
## Examples
25+
<Flagpack.flag name={:usa} />
26+
<Flagpack.flag name={:usa} class="w-5 h-5" />
27+
"""
2228
def flag(assigns) do
2329
apply(Flagpack, assigns.name, [assigns])
2430
end

mix.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ defmodule Flagpack.MixProject do
2222
def project do
2323
[
2424
app: :flagpack,
25-
version: "0.4.0",
25+
version: "0.4.1",
2626
elixir: "~> 1.16",
2727
start_permanent: Mix.env() == :prod,
2828
deps: deps(),

0 commit comments

Comments
 (0)