Class: PhlexKit::MenubarRadioGroup
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::MenubarRadioGroup
- Defined in:
- app/components/phlex_kit/menubar/menubar_radio_group.rb
Overview
Exclusive-choice group of MenubarRadioItems (share the same name:).
Mirrors shadcn/ui's MenubarRadioGroup. role="group" (NOT "radiogroup"):
radiogroup may not own menuitemradio children (axe aria-required-children).
See menubar.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ MenubarRadioGroup
constructor
A new instance of MenubarRadioGroup.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ MenubarRadioGroup
Returns a new instance of MenubarRadioGroup.
7 |
# File 'app/components/phlex_kit/menubar/menubar_radio_group.rb', line 7 def initialize(**attrs) = (@attrs = attrs) |
Instance Method Details
#view_template ⇒ Object
8 9 10 |
# File 'app/components/phlex_kit/menubar/menubar_radio_group.rb', line 8 def view_template(&) div(**mix({ class: "pk-menubar-group", role: "group" }, @attrs), &) end |