Skip to content

Commit

Permalink
Fix: TopNav when in mobile view (size < md) (#128)
Browse files Browse the repository at this point in the history
* Update drawer_dropdown.ex

* Update top_nav.ex

* Update top_nav.ex

* Fix typo

* Fix missing argument
  • Loading branch information
NduatiK authored Apr 29, 2024
1 parent 00a8e64 commit fe789b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/ash_admin/components/top_nav.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
6 changes: 5 additions & 1 deletion lib/ash_admin/components/top_nav/drawer_dropdown.ex
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,18 @@ 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>
</div>
"""
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
Expand Down

0 comments on commit fe789b1

Please sign in to comment.