Class: Railsboot::Breadcrumb::ItemComponent
- Inherits:
-
Component
- Object
- Component
- Railsboot::Breadcrumb::ItemComponent
- Defined in:
- app/components/railsboot/breadcrumb/item_component.rb
Instance Method Summary collapse
-
#initialize(text: "", href: "", active: false, **html_attributes) ⇒ ItemComponent
constructor
A new instance of ItemComponent.
Constructor Details
#initialize(text: "", href: "", active: false, **html_attributes) ⇒ ItemComponent
Returns a new instance of ItemComponent.
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/components/railsboot/breadcrumb/item_component.rb', line 2 def initialize(text: "", href: "", active: false, **html_attributes) @text = text @href = href @active = active @html_attributes = html_attributes @html_attributes[:tag] = "li" @html_attributes[:class] = class_names( "breadcrumb-item", {"active" => @active}, html_attributes.delete(:class) ) end |