Module: UI::BreadcrumbSeparatorBehavior
- Included in:
- BreadcrumbSeparator, BreadcrumbSeparatorComponent
- Defined in:
- app/behaviors/ui/breadcrumb_separator_behavior.rb
Overview
BreadcrumbSeparatorBehavior
Shared behavior for Breadcrumb Separator component across ERB, ViewComponent, and Phlex implementations. This module provides consistent HTML attribute generation for breadcrumb separators.
Instance Method Summary collapse
-
#breadcrumb_separator_classes ⇒ Object
Returns combined CSS classes for the breadcrumb separator.
-
#breadcrumb_separator_html_attributes ⇒ Object
Returns HTML attributes for the breadcrumb separator element.
Instance Method Details
#breadcrumb_separator_classes ⇒ Object
Returns combined CSS classes for the breadcrumb separator
19 20 21 22 23 24 25 26 |
# File 'app/behaviors/ui/breadcrumb_separator_behavior.rb', line 19 def classes_value = respond_to?(:classes, true) ? classes : @classes TailwindMerge::Merger.new.merge([ , classes_value ].compact.join(" ")) end |
#breadcrumb_separator_html_attributes ⇒ Object
Returns HTML attributes for the breadcrumb separator element
9 10 11 12 13 14 15 16 |
# File 'app/behaviors/ui/breadcrumb_separator_behavior.rb', line 9 def attributes_value = respond_to?(:attributes, true) ? attributes : @attributes { class: , role: "presentation", "aria-hidden": "true" }.merge(attributes_value || {}) end |