Sha256: c447219a22f53a09b8b77f9131b57858b056c595ffb0543b042b096c8b9bae69
Contents?: true
Size: 902 Bytes
Versions: 6
Compression:
Stored size: 902 Bytes
Contents
<%= render(Primer::Alpha::NavList.new) do |list| %> <% list.with_group do |group| %> <%= group.with_heading(title: "Shopping list") %> <% group.with_item(label: "Bread", href: "/list/1") do |item| %> <%= item.with_trailing_action(icon: :plus, aria: { label: "Activate alert" }, name: "bread_button") %> <% end %> <% group.with_item(label: "Cheese", href: "/list/2") do |item| %> <%= item.with_trailing_action(icon: :plus, aria: { label: "Activate alert" }, name: "cheese_button") %> <% end %> <% end %> <% end %> <script type="text/javascript" data-eval="true"> const breadButton = document.querySelector("[name=bread_button]") breadButton.addEventListener("click", () => alert("You selected bread.")) const cheeseButton = document.querySelector("[name=cheese_button]") cheeseButton.addEventListener("click", () => alert("You selected cheese.")) </script>
Version data entries
6 entries across 6 versions & 1 rubygems