Module: UI::DropdownMenuShortcutBehavior
- Included in:
- DropdownMenuShortcut, DropdownMenuShortcutComponent
- Defined in:
- app/behaviors/ui/dropdown_menu_shortcut_behavior.rb
Overview
DropdownMenuShortcutBehavior
Shared behavior for DropdownMenuShortcut component across ERB, ViewComponent, and Phlex implementations.
Instance Method Summary collapse
-
#dropdown_menu_shortcut_classes ⇒ Object
Returns combined CSS classes for the shortcut.
-
#dropdown_menu_shortcut_html_attributes ⇒ Object
Returns HTML attributes for the shortcut.
Instance Method Details
#dropdown_menu_shortcut_classes ⇒ Object
Returns combined CSS classes for the shortcut
15 16 17 18 19 20 |
# File 'app/behaviors/ui/dropdown_menu_shortcut_behavior.rb', line 15 def classes_value = respond_to?(:classes, true) ? classes : @classes base_classes = "text-muted-foreground ml-auto text-xs tracking-widest" TailwindMerge::Merger.new.merge([base_classes, classes_value].compact.join(" ")) end |
#dropdown_menu_shortcut_html_attributes ⇒ Object
Returns HTML attributes for the shortcut
8 9 10 11 12 |
# File 'app/behaviors/ui/dropdown_menu_shortcut_behavior.rb', line 8 def { class: } end |