Class: KozenetUi::HeaderComponent::NavItemComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/kozenet_ui/header_component/nav_item_component.rb

Overview

NavItem section for the HeaderComponent Renders a navigation item (link/button) in the header

Examples:

<%= render KozenetUi::HeaderComponent::NavItemComponent.new(href: "/path", active: true) { "Home" } %>

Constant Summary

Constants inherited from BaseComponent

BaseComponent::UNSET

Instance Attribute Summary

Attributes inherited from BaseComponent

#html_options, #size, #variant

Instance Method Summary collapse

Constructor Details

#initialize(href: "#", active: false, dropdown: false, **html_options) ⇒ NavItemComponent

Returns a new instance of NavItemComponent.



11
12
13
14
15
16
# File 'app/components/kozenet_ui/header_component/nav_item_component.rb', line 11

def initialize(href: "#", active: false, dropdown: false, **html_options)
  super(**html_options)
  @href = href
  @active = active
  @dropdown = dropdown
end