Skip to content

Commit

Permalink
Drop Alpine for stimulus
Browse files Browse the repository at this point in the history
  • Loading branch information
justalever committed May 4, 2023
1 parent 9673054 commit ebe3822
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions app/views/railsui/shared/_launcher.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<div>
<!-- Rails UI Launcher - Only visible in development -->
<div class="rui-launcher" x-data="{ open: false }">
<button type="button" @click="open = true" data-turbo="false">
<!-- Rails UI Launcher - Only visible in development -->
<div data-controller="dropdown" class="relative inline-block">
<div class="rui-launcher">
<button type="button" data-turbo="false" data-action="click->dropdown#toggle click@window->dropdown#hide">
<%= icon "r", path: "r.svg", classes: "rui-r" %>
</button>
<nav x-show="open" @click.outside="open = false" x-transition>
<nav class="hidden" data-dropdown-target="menu">
<ul>
<li>
<%= link_to "Start", railsui.start_url, data: { turbo: false } %>
Expand Down Expand Up @@ -57,6 +57,10 @@
box-shadow: none;
}

.rui-launcher nav.hidden {
display: none;
}

.rui-launcher nav {
position: absolute;
left: 0px;
Expand Down Expand Up @@ -103,5 +107,4 @@
}
}
</style>
<script src="//unpkg.com/alpinejs" defer></script>
</div>

0 comments on commit ebe3822

Please sign in to comment.