Class: Arara::MenuDividerComponent

Inherits:
ActionView::Component::Base
  • Object
show all
Includes:
BaseComponent
Defined in:
app/components/arara/menu_divider_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) ⇒ MenuDividerComponent

Returns a new instance of MenuDividerComponent.



5
6
7
# File 'app/components/arara/menu_divider_component.rb', line 5

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

Instance Method Details

#default_html_classObject



9
10
11
# File 'app/components/arara/menu_divider_component.rb', line 9

def default_html_class
  "mdc-list-divider"
end

#html_optionsObject



13
14
15
16
17
# File 'app/components/arara/menu_divider_component.rb', line 13

def html_options
  opts = super
  opts[:role] = "separator"
  opts
end