Class: PhlexKit::RadioGroup
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::RadioGroup
- Defined in:
- app/components/phlex_kit/radio_group/radio_group.rb
Overview
Radio list wrapper, ported from shadcn/ui's RadioGroup: a role=radiogroup
grid of (RadioButton + Label) rows sharing a name. The kit's RadioButton
is the item. .pk-radio-group (radio_group.css).
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ RadioGroup
constructor
A new instance of RadioGroup.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ RadioGroup
Returns a new instance of RadioGroup.
6 7 8 |
# File 'app/components/phlex_kit/radio_group/radio_group.rb', line 6 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
10 11 12 |
# File 'app/components/phlex_kit/radio_group/radio_group.rb', line 10 def view_template(&) div(**mix({ class: "pk-radio-group", role: "radiogroup" }, @attrs), &) end |