Module: UI::SidebarRailBehavior
- Included in:
- SidebarRail
- Defined in:
- app/behaviors/ui/sidebar_rail_behavior.rb
Overview
UI::SidebarRailBehavior
Instance Method Summary collapse
- #sidebar_rail_classes ⇒ Object
- #sidebar_rail_data_attributes ⇒ Object
- #sidebar_rail_html_attributes ⇒ Object
Instance Method Details
#sidebar_rail_classes ⇒ Object
25 26 27 28 29 30 31 |
# File 'app/behaviors/ui/sidebar_rail_behavior.rb', line 25 def classes_value = respond_to?(:classes, true) ? classes : @classes TailwindMerge::Merger.new.merge([ , classes_value ].compact.join(" ")) end |
#sidebar_rail_data_attributes ⇒ Object
33 34 35 36 37 38 |
# File 'app/behaviors/ui/sidebar_rail_behavior.rb', line 33 def { slot: "sidebar-rail", action: "click->ui--sidebar#toggle" } end |
#sidebar_rail_html_attributes ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'app/behaviors/ui/sidebar_rail_behavior.rb', line 16 def { class: , data: , tabindex: "-1", aria: {label: "Toggle Sidebar"} } end |