mirror of
https://github.com/ash-project/ash_admin.git
synced 2024-09-19 12:53:28 +12:00
Fix: TopNav when in mobile view (size < md) (#128)
* Update drawer_dropdown.ex * Update top_nav.ex * Update top_nav.ex * Fix typo * Fix missing argument
This commit is contained in:
parent
00a8e64d12
commit
fe789b159b
2 changed files with 7 additions and 3 deletions
|
@ -103,12 +103,12 @@ defmodule AshAdmin.Components.TopNav do
|
|||
<div :if={@open} class="md:hidden" x-cloak>
|
||||
<div class="relative px-2 pt-2 pb-3 sm:px-3">
|
||||
<div class="block px-4 py-2 text-sm">
|
||||
<.live_component
|
||||
<ActorSelect.actor_select
|
||||
:if={@actor_resources != []}
|
||||
module={ActorSelect}
|
||||
actor_resources={@actor_resources}
|
||||
authorizing={@authorizing}
|
||||
actor_paused={@actor_paused}
|
||||
actor_tenant={@actor_tenant}
|
||||
actor={@actor}
|
||||
toggle_authorizing={@toggle_authorizing}
|
||||
toggle_actor_paused={@toggle_actor_paused}
|
||||
|
|
|
@ -46,7 +46,7 @@ defmodule AshAdmin.Components.TopNav.DrawerDropdown do
|
|||
class="block px-4 py-2 text-sm hover:bg-gray-200 hover:text-gray-900"
|
||||
role="menuitem"
|
||||
>
|
||||
{link.text}
|
||||
<%= link.text %>
|
||||
</.link>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -54,6 +54,10 @@ defmodule AshAdmin.Components.TopNav.DrawerDropdown do
|
|||
"""
|
||||
end
|
||||
|
||||
def mount(socket) do
|
||||
{:ok, assign(socket, :open, false)}
|
||||
end
|
||||
|
||||
def handle_event("toggle", _, socket) do
|
||||
{:noreply, assign(socket, :open, !socket.assigns.open)}
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue