Class: SdrViewComponents::Elements::Navigation::DropdownMenuComponent

Inherits:
BaseComponent
  • Object
show all
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

Instance Method Summary collapse

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

#textObject (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