Module: UI::ScrollAreaThumbBehavior
- Included in:
- ScrollAreaThumb, ScrollAreaThumbComponent
- Defined in:
- app/helpers/ui/scroll_area_thumb_behavior.rb,
app/behaviors/ui/scroll_area_thumb_behavior.rb
Overview
UI::ScrollAreaThumbBehavior
Instance Method Summary collapse
-
#scroll_area_thumb_classes ⇒ Object
Returns combined CSS classes.
-
#scroll_area_thumb_html_attributes ⇒ Object
Returns HTML attributes for the thumb element.
Instance Method Details
#scroll_area_thumb_classes ⇒ Object
Returns combined CSS classes
20 21 22 23 24 25 26 |
# File 'app/helpers/ui/scroll_area_thumb_behavior.rb', line 20 def scroll_area_thumb_classes classes_value = respond_to?(:classes, true) ? classes : @classes TailwindMerge::Merger.new.merge([ scroll_area_thumb_base_classes, classes_value ].compact.join(" ")) end |
#scroll_area_thumb_html_attributes ⇒ Object
Returns HTML attributes for the thumb element
9 10 11 12 13 14 15 16 17 |
# File 'app/helpers/ui/scroll_area_thumb_behavior.rb', line 9 def scroll_area_thumb_html_attributes attributes_value = respond_to?(:attributes, true) ? attributes : @attributes { class: scroll_area_thumb_classes, data: { slot: "scroll-area-thumb" } }.merge(attributes_value || {}) end |