Class: SdrViewComponents::Elements::Navigation::DropdownMenuComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- SdrViewComponents::Elements::Navigation::DropdownMenuComponent
- Defined in:
- app/components/sdr_view_components/elements/navigation/dropdown_menu_component.rb
Overview
Component for rendering a dropdown menu in the navigation bar.
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text:) ⇒ DropdownMenuComponent
constructor
A new instance of DropdownMenuComponent.
Methods inherited from BaseComponent
#args_for, #merge_actions, #merge_classes
Constructor Details
#initialize(text:) ⇒ DropdownMenuComponent
Returns a new instance of DropdownMenuComponent.
10 11 12 13 |
# File 'app/components/sdr_view_components/elements/navigation/dropdown_menu_component.rb', line 10 def initialize(text:) @text = text super() end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
15 16 17 |
# File 'app/components/sdr_view_components/elements/navigation/dropdown_menu_component.rb', line 15 def text @text end |