Class: Maglev::Uikit::MenuDropdownComponent::LinkToItemComponent

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

Direct Known Subclasses

ButtonToItemComponent

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ItemComponent

inner_content, #right_arrow?

Constructor Details

#initialize(options = nil, html_options = nil, parent: nil) ⇒ LinkToItemComponent

Returns a new instance of LinkToItemComponent.



128
129
130
131
132
133
134
135
# File 'app/components/maglev/uikit/menu_dropdown_component.rb', line 128

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

  apply_parent_classes
end

Instance Attribute Details

#html_optionsObject (readonly)

Returns the value of attribute html_options.



126
127
128
# File 'app/components/maglev/uikit/menu_dropdown_component.rb', line 126

def html_options
  @html_options
end

#optionsObject (readonly)

Returns the value of attribute options.



126
127
128
# File 'app/components/maglev/uikit/menu_dropdown_component.rb', line 126

def options
  @options
end

#parent_componentObject (readonly)

Returns the value of attribute parent_component.



126
127
128
# File 'app/components/maglev/uikit/menu_dropdown_component.rb', line 126

def parent_component
  @parent_component
end

#variantObject (readonly)

Returns the value of attribute variant.



126
127
128
# File 'app/components/maglev/uikit/menu_dropdown_component.rb', line 126

def variant
  @variant
end