Sha256: dda3f69ed0780eead659e948bc196185cae885d79e7b5cf5ad109f31fe456f16
Contents?: true
Size: 1.08 KB
Versions: 18
Compression:
Stored size: 1.08 KB
Contents
# frozen_string_literal: true module Primer module Forms module Dsl # :nodoc: class RadioButtonInput < Input attr_reader :name, :value, :label, :nested_form_block, :nested_form_arguments def initialize(name:, value:, label:, **system_arguments) @name = name @value = value @label = label super(**system_arguments) yield(self) if block_given? end # radio buttons cannot be invalid, as both selected and unselected are valid states # :nocov: def valid? true end # :nocov: def to_component RadioButton.new(input: self) end def nested_form(**system_arguments, &block) @nested_form_arguments = system_arguments @nested_form_block = block end # :nocov: def type :radio_button end # :nocov: def supports_validation? false end def values_disambiguate_template_names? true end end end end end
Version data entries
18 entries across 18 versions & 2 rubygems