Class: LightningUiKit::NavigationMenu::ItemComponent
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- LightningUiKit::NavigationMenu::ItemComponent
- Defined in:
- app/components/lightning_ui_kit/navigation_menu/item_component.rb
Instance Attribute Summary collapse
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title:, href: nil, **options) ⇒ ItemComponent
constructor
A new instance of ItemComponent.
- #link? ⇒ Boolean
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, **) @title = title @href = href @options = end |
Instance Attribute Details
#href ⇒ Object (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 |
#title ⇒ Object (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
10 11 12 |
# File 'app/components/lightning_ui_kit/navigation_menu/item_component.rb', line 10 def link? @href.present? end |