Module: UI::ScrollAreaScrollbarBehavior
- Included in:
- ScrollAreaScrollbar, ScrollAreaScrollbarComponent
- Defined in:
- app/helpers/ui/scroll_area_scrollbar_behavior.rb,
app/behaviors/ui/scroll_area_scrollbar_behavior.rb
Overview
UI::ScrollAreaScrollbarBehavior
Instance Method Summary collapse
-
#scroll_area_scrollbar_classes ⇒ Object
Returns combined CSS classes.
-
#scroll_area_scrollbar_html_attributes ⇒ Object
Returns HTML attributes for the scrollbar element.
Instance Method Details
#scroll_area_scrollbar_classes ⇒ Object
Returns combined CSS classes
23 24 25 26 27 28 29 30 31 32 |
# File 'app/helpers/ui/scroll_area_scrollbar_behavior.rb', line 23 def classes_value = respond_to?(:classes, true) ? classes : @classes orientation_value = respond_to?(:orientation, true) ? orientation : @orientation TailwindMerge::Merger.new.merge([ , (orientation_value), classes_value ].compact.join(" ")) end |
#scroll_area_scrollbar_html_attributes ⇒ Object
Returns HTML attributes for the scrollbar element
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/helpers/ui/scroll_area_scrollbar_behavior.rb', line 9 def attributes_value = respond_to?(:attributes, true) ? attributes : @attributes orientation_value = respond_to?(:orientation, true) ? orientation : @orientation { class: , data: { slot: "scroll-area-scrollbar", orientation: orientation_value } }.merge(attributes_value || {}) end |