Class: Maquina::Navbar::MobileButton
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- Maquina::Navbar::MobileButton
- Includes:
- ApplicationView
- Defined in:
- app/views/maquina/navbar/mobile_button.rb
Instance Method Summary collapse
Methods included from ApplicationView
#attribute_human_name, #button_to, #image_tag, #link_to, #model_human_name, #svg_icon
Instance Method Details
#view_template(&block) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'app/views/maquina/navbar/mobile_button.rb', line 8 def view_template(&block) div class: "flex items-center lg:hidden" do type: "button", class: "mobile-button", "aria-controls": "mobile-menu", "aria-expanded": false, "data-action": "mobile-menu#toggle" do span(class: "sr-only") { "Open main menu" } svg_icon(:outline, data: {"mobile-menu-target": :open}, icon: closed_icon) svg_icon(:outline, css_class: "hidden h-6 -w6", data: {"mobile-menu-target": :close}, icon: opened_icon) end end end |