Class: Railsboot::Navbar::NavComponent
- Inherits:
-
Component
- Object
- Component
- Railsboot::Navbar::NavComponent
- Defined in:
- app/components/railsboot/navbar/nav_component.rb
Overview
ViewComponent: renders the nav block.
Instance Method Summary collapse
-
#initialize(tag: "nav", **html_attributes) ⇒ NavComponent
constructor
A new instance of NavComponent.
Constructor Details
#initialize(tag: "nav", **html_attributes) ⇒ NavComponent
Returns a new instance of NavComponent.
6 7 8 9 10 11 12 13 14 15 |
# File 'app/components/railsboot/navbar/nav_component.rb', line 6 def initialize(tag: "nav", **html_attributes) @tag = tag @html_attributes = html_attributes @html_attributes[:tag] = @tag @html_attributes[:class] = class_names( "navbar-nav", html_attributes.delete(:class) ) end |