remove non-referring close button from modal

This commit is contained in:
shibao 2022-02-14 20:29:35 -05:00
parent 114f63b47a
commit f84f5ac133

View File

@ -37,8 +37,6 @@ defmodule CanneryWeb.LiveHelpers do
</.modal>
"""
def modal(assigns) do
assigns = assign_new(assigns, :return_to, fn -> nil end)
~H"""
<div
id="modal"
@ -57,7 +55,6 @@ defmodule CanneryWeb.LiveHelpers do
phx-window-keydown={hide_modal()}
phx-key="escape"
>
<%= if @return_to do %>
<%= live_patch to: @return_to,
id: "close",
class:
@ -65,16 +62,6 @@ defmodule CanneryWeb.LiveHelpers do
phx_click: hide_modal() do %>
<i class="fa-fw fa-lg fas fa-times"></i>
<% end %>
<% else %>
<a
id="close"
href="#"
class="absolute top-8 right-10 text-gray-500 hover:text-gray-800 transition-all duration-500 ease-in-out"
phx-click={hide_modal()}
>
<i class="fa-fw fa-lg fas fa-times"></i>
</a>
<% end %>
<div class="p-8 flex flex-col space-y-4 justify-start items-center">
<%= render_slot(@inner_block) %>