Skip to content

Commit ba40753

Browse files
committed
move normalize to correct place in module
1 parent 103e010 commit ba40753

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lib/scenic/themes.ex

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,10 @@ defmodule Scenic.Themes do
249249
module()._get_palette()
250250
end
251251

252-
@doc false
252+
@spec normalize({atom, atom} | map) :: map | nil
253+
@doc """
254+
Converts a theme from it's tuple form to it's map form.
255+
"""
253256
def normalize({lib, theme_name}) when is_atom(theme_name) do
254257
themes = module().library()
255258
case Map.get(themes, lib) do
@@ -258,12 +261,6 @@ defmodule Scenic.Themes do
258261
end
259262
end
260263

261-
@spec normalize({atom, atom} | map) :: map | nil
262-
@doc """
263-
Converts a theme from it's tuple form to it's map form.
264-
"""
265-
def normalize(theme) when is_map(theme), do: theme
266-
267264
@spec preset({atom, atom} | map) :: map | nil
268265
@doc """
269266
Get a theme.
@@ -276,6 +273,8 @@ defmodule Scenic.Themes do
276273
end
277274
end
278275

276+
def preset(theme) when is_map(theme), do: theme
277+
279278
@theme_light %{
280279
text: :black,
281280
background: :white,

0 commit comments

Comments
 (0)