Class: Arara::MenuComponent

Inherits:
ActionView::Component::Base
  • Object
show all
Includes:
BaseComponent
Defined in:
app/components/arara/menu_component.rb

Instance Method Summary collapse

Methods included from BaseComponent

#default_data_controller, #default_html_tag, #html_class, #html_content, #html_data, #html_tag, included

Constructor Details

#initialize(**kw) ⇒ MenuComponent

Returns a new instance of MenuComponent.



6
7
8
# File 'app/components/arara/menu_component.rb', line 6

def initialize(**kw)
  super(tag: "div", **kw)
end

Instance Method Details

#default_html_classObject



10
11
12
# File 'app/components/arara/menu_component.rb', line 10

def default_html_class
  "mdc-menu mdc-menu-surface"
end

#html_optionsObject



14
15
16
17
18
# File 'app/components/arara/menu_component.rb', line 14

def html_options
  opts = super
  opts[:tabindex] = "-1"
  opts
end