Module: UI::BreadcrumbItemBehavior
- Included in:
- BreadcrumbItem, BreadcrumbItemComponent
- Defined in:
- app/behaviors/ui/breadcrumb_item_behavior.rb
Overview
BreadcrumbItemBehavior
Shared behavior for Breadcrumb Item component across ERB, ViewComponent, and Phlex implementations. This module provides consistent HTML attribute generation for individual breadcrumb items.
Instance Method Summary collapse
-
#breadcrumb_item_classes ⇒ Object
Returns combined CSS classes for the breadcrumb item.
-
#breadcrumb_item_html_attributes ⇒ Object
Returns HTML attributes for the breadcrumb item element.
Instance Method Details
#breadcrumb_item_classes ⇒ Object
Returns combined CSS classes for the breadcrumb item
17 18 19 20 21 22 23 24 |
# File 'app/behaviors/ui/breadcrumb_item_behavior.rb', line 17 def classes_value = respond_to?(:classes, true) ? classes : @classes TailwindMerge::Merger.new.merge([ , classes_value ].compact.join(" ")) end |
#breadcrumb_item_html_attributes ⇒ Object
Returns HTML attributes for the breadcrumb item element
9 10 11 12 13 14 |
# File 'app/behaviors/ui/breadcrumb_item_behavior.rb', line 9 def attributes_value = respond_to?(:attributes, true) ? attributes : @attributes { class: }.merge(attributes_value || {}) end |