Class: PhlexKit::ContextMenuRadioGroup

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/phlex_kit/context_menu/context_menu_radio_group.rb

Overview

Exclusive-choice group of ContextMenuRadioItems (share the same name:). Mirrors shadcn/ui's ContextMenuRadioGroup. See context_menu.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ ContextMenuRadioGroup

Returns a new instance of ContextMenuRadioGroup.



5
# File 'app/components/phlex_kit/context_menu/context_menu_radio_group.rb', line 5

def initialize(**attrs) = (@attrs = attrs)

Instance Method Details

#view_templateObject



6
7
8
# File 'app/components/phlex_kit/context_menu/context_menu_radio_group.rb', line 6

def view_template(&)
  div(**mix({ class: "pk-context-menu-group", role: "radiogroup" }, @attrs), &)
end