Remove unused modal helpers
This commit is contained in:
@@ -367,31 +367,6 @@ defmodule MusicLibraryWeb.CoreComponents do
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def show_modal(js \\ %JS{}, id) when is_binary(id) do
|
|
||||||
js
|
|
||||||
|> JS.show(to: "##{id}")
|
|
||||||
|> JS.show(
|
|
||||||
to: "##{id}-bg",
|
|
||||||
time: 300,
|
|
||||||
transition: {"transition-all transform ease-out duration-300", "opacity-0", "opacity-100"}
|
|
||||||
)
|
|
||||||
|> show("##{id}-container")
|
|
||||||
|> JS.add_class("overflow-hidden", to: "body")
|
|
||||||
|> JS.focus_first(to: "##{id}-content")
|
|
||||||
end
|
|
||||||
|
|
||||||
def hide_modal(js \\ %JS{}, id) do
|
|
||||||
js
|
|
||||||
|> JS.hide(
|
|
||||||
to: "##{id}-bg",
|
|
||||||
transition: {"transition-all transform ease-in duration-200", "opacity-100", "opacity-0"}
|
|
||||||
)
|
|
||||||
|> hide("##{id}-container")
|
|
||||||
|> JS.hide(to: "##{id}", transition: {"block", "block", "hidden"})
|
|
||||||
|> JS.remove_class("overflow-hidden", to: "body")
|
|
||||||
|> JS.pop_focus()
|
|
||||||
end
|
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Translates an error message using gettext.
|
Translates an error message using gettext.
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user