class Ariadne::Forms::Dsl::RadioButtonGroupInput
:nodoc:
def autofocus!
def autofocus! @radio_buttons.first&.autofocus! end
def focusable?
def focusable? true end
def initialize(name:, label: nil, **options)
def initialize(name:, label: nil, **options) @name = name @label = label @radio_buttons = [] super(**options) yield(self) if block_given? end
def radio_button(**options, &block)
def radio_button(**options, &block) @radio_buttons << RadioButtonInput.new( builder: @builder, form: @form, name: @name, disabled: disabled?, **options, &block ).to_component end
def to_component
def to_component component = Ariadne::Form::RadioButtonGroup::Component.new(name:, label:, **@options) @radio_buttons.each do |radio_button| component.rendered_radio_button(radio_button) end component end
def type
def type :radio_button_group end