Class: Maglev::Uikit::MenuDropdownComponent::TextItemComponent

Inherits:
ItemComponent
  • Object
show all
Defined in:
app/components/maglev/uikit/menu_dropdown_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ItemComponent

inner_content, #right_arrow?

Constructor Details

#initialize(options = nil, parent: nil) ⇒ TextItemComponent

Returns a new instance of TextItemComponent.



104
105
106
107
108
109
110
# File 'app/components/maglev/uikit/menu_dropdown_component.rb', line 104

def initialize(options = nil, parent: nil)
  @parent_component = parent
  @options = options || {}
  @variant = @options.delete(:variant)

  apply_parent_classes
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



102
103
104
# File 'app/components/maglev/uikit/menu_dropdown_component.rb', line 102

def options
  @options
end

#parent_componentObject (readonly)

Returns the value of attribute parent_component.



102
103
104
# File 'app/components/maglev/uikit/menu_dropdown_component.rb', line 102

def parent_component
  @parent_component
end

#variantObject (readonly)

Returns the value of attribute variant.



102
103
104
# File 'app/components/maglev/uikit/menu_dropdown_component.rb', line 102

def variant
  @variant
end