Class: Arara::MenuItemComponent
- Inherits:
-
ActionView::Component::Base
- Object
- ActionView::Component::Base
- Arara::MenuItemComponent
show all
- Includes:
- BaseComponent
- Defined in:
- app/components/arara/menu_item_component.rb
Instance Method Summary
collapse
#default_data_controller, #default_html_tag, #html_class, #html_content, #html_data, #html_tag, included
Constructor Details
Returns a new instance of MenuItemComponent.
4
5
6
|
# File 'app/components/arara/menu_item_component.rb', line 4
def initialize(**kw)
super(tag: "li", **kw)
end
|
Instance Method Details
#content ⇒ Object
19
20
21
|
# File 'app/components/arara/menu_item_component.rb', line 19
def content
user_content
end
|
#default_html_class ⇒ Object
8
9
10
|
# File 'app/components/arara/menu_item_component.rb', line 8
def default_html_class
"mdc-list-item"
end
|
#html_options ⇒ Object
12
13
14
15
16
17
|
# File 'app/components/arara/menu_item_component.rb', line 12
def html_options
opts = super
opts[:role] = "menuitem"
opts[:tabindex] = "-1"
opts
end
|