Class: LightningUiKit::NavigationMenu::ItemComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/lightning_ui_kit/navigation_menu/item_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title:, href: nil, **options) ⇒ ItemComponent

Returns a new instance of ItemComponent.



4
5
6
7
8
# File 'app/components/lightning_ui_kit/navigation_menu/item_component.rb', line 4

def initialize(title:, href: nil, **options)
  @title = title
  @href = href
  @options = options
end

Instance Attribute Details

#hrefObject (readonly)

Returns the value of attribute href.



2
3
4
# File 'app/components/lightning_ui_kit/navigation_menu/item_component.rb', line 2

def href
  @href
end

#titleObject (readonly)

Returns the value of attribute title.



2
3
4
# File 'app/components/lightning_ui_kit/navigation_menu/item_component.rb', line 2

def title
  @title
end

Instance Method Details

#link?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/components/lightning_ui_kit/navigation_menu/item_component.rb', line 10

def link?
  @href.present?
end