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