Class: UI::MenubarRadioGroup
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::MenubarRadioGroup
- Includes:
- MenubarRadioGroupBehavior
- Defined in:
- app/components/ui/menubar_radio_group.rb
Overview
RadioGroup - Phlex implementation
Container for radio items in the menu.
Instance Method Summary collapse
-
#initialize(value: nil, classes: "", **attributes) ⇒ MenubarRadioGroup
constructor
A new instance of MenubarRadioGroup.
- #view_template(&block) ⇒ Object
Methods included from MenubarRadioGroupBehavior
#menubar_radio_group_classes, #menubar_radio_group_data_attributes, #menubar_radio_group_html_attributes
Constructor Details
#initialize(value: nil, classes: "", **attributes) ⇒ MenubarRadioGroup
Returns a new instance of MenubarRadioGroup.
18 19 20 21 22 |
# File 'app/components/ui/menubar_radio_group.rb', line 18 def initialize(value: nil, classes: "", **attributes) @value = value @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
24 25 26 27 28 |
# File 'app/components/ui/menubar_radio_group.rb', line 24 def view_template(&block) div(**.deep_merge(@attributes)) do yield if block_given? end end |