Module: UI::DropdownMenuRadioGroupBehavior
- Included in:
- DropdownMenuRadioGroup, DropdownMenuRadioGroupComponent
- Defined in:
- app/behaviors/ui/dropdown_menu_radio_group_behavior.rb
Overview
DropdownMenuRadioGroupBehavior
Shared behavior for DropdownMenuRadioGroup component across ERB, ViewComponent, and Phlex implementations.
Instance Method Summary collapse
-
#dropdown_menu_radio_group_classes ⇒ Object
Returns combined CSS classes for the radio group.
-
#dropdown_menu_radio_group_html_attributes ⇒ Object
Returns HTML attributes for the radio group.
Instance Method Details
#dropdown_menu_radio_group_classes ⇒ Object
Returns combined CSS classes for the radio group
16 17 18 19 |
# File 'app/behaviors/ui/dropdown_menu_radio_group_behavior.rb', line 16 def classes_value = respond_to?(:classes, true) ? classes : @classes TailwindMerge::Merger.new.merge([classes_value].compact.join(" ")) end |
#dropdown_menu_radio_group_html_attributes ⇒ Object
Returns HTML attributes for the radio group
8 9 10 11 12 13 |
# File 'app/behaviors/ui/dropdown_menu_radio_group_behavior.rb', line 8 def { class: , role: "group" } end |