Module: UI::SidebarMenuActionBehavior
- Included in:
- SidebarMenuAction
- Defined in:
- app/behaviors/ui/sidebar_menu_action_behavior.rb
Overview
MenuActionBehavior
Shared behavior for SidebarMenuAction component.
Instance Method Summary collapse
- #sidebar_menu_action_classes ⇒ Object
- #sidebar_menu_action_data_attributes ⇒ Object
- #sidebar_menu_action_html_attributes ⇒ Object
Instance Method Details
#sidebar_menu_action_classes ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'app/behaviors/ui/sidebar_menu_action_behavior.rb', line 16 def show_on_hover = respond_to?(:show_on_hover, true) ? show_on_hover : @show_on_hover classes_value = respond_to?(:classes, true) ? classes : @classes TailwindMerge::Merger.new.merge([ , show_on_hover ? : nil, classes_value ].compact.join(" ")) end |
#sidebar_menu_action_data_attributes ⇒ Object
27 28 29 30 31 |
# File 'app/behaviors/ui/sidebar_menu_action_behavior.rb', line 27 def { slot: "sidebar-menu-action" } end |
#sidebar_menu_action_html_attributes ⇒ Object
9 10 11 12 13 14 |
# File 'app/behaviors/ui/sidebar_menu_action_behavior.rb', line 9 def { class: , data: } end |