Class: Railsboot::Navbar::TogglerComponent
- Inherits:
-
Component
- Object
- Component
- Railsboot::Navbar::TogglerComponent
- Defined in:
- app/components/railsboot/navbar/toggler_component.rb
Instance Method Summary collapse
-
#initialize(id:, **html_attributes) ⇒ TogglerComponent
constructor
A new instance of TogglerComponent.
Constructor Details
#initialize(id:, **html_attributes) ⇒ TogglerComponent
Returns a new instance of TogglerComponent.
2 3 4 5 6 7 8 9 10 |
# File 'app/components/railsboot/navbar/toggler_component.rb', line 2 def initialize(id:, **html_attributes) @id = id @html_attributes = html_attributes @html_attributes[:class] = class_names( "navbar-toggler", html_attributes.delete(:class) ) end |