Module: UI::DropdownMenuSeparatorBehavior
- Included in:
- DropdownMenuSeparator, DropdownMenuSeparatorComponent
- Defined in:
- app/behaviors/ui/dropdown_menu_separator_behavior.rb
Overview
DropdownMenuSeparatorBehavior
Shared behavior for DropdownMenuSeparator component across ERB, ViewComponent, and Phlex implementations.
Instance Method Summary collapse
-
#dropdown_menu_separator_classes ⇒ Object
Returns combined CSS classes for the separator.
-
#dropdown_menu_separator_html_attributes ⇒ Object
Returns HTML attributes for the separator.
Instance Method Details
#dropdown_menu_separator_classes ⇒ Object
Returns combined CSS classes for the separator
17 18 19 20 21 22 |
# File 'app/behaviors/ui/dropdown_menu_separator_behavior.rb', line 17 def classes_value = respond_to?(:classes, true) ? classes : @classes base_classes = "bg-border -mx-1 my-1 h-px" TailwindMerge::Merger.new.merge([base_classes, classes_value].compact.join(" ")) end |
#dropdown_menu_separator_html_attributes ⇒ Object
Returns HTML attributes for the separator
8 9 10 11 12 13 14 |
# File 'app/behaviors/ui/dropdown_menu_separator_behavior.rb', line 8 def { class: , role: "separator", "aria-orientation": "horizontal" } end |