Sha256: b3f8e4f7291ef9afff9f9d6688fb5653ffa8d67fba533bc75abbd16dcda3f9b3
Contents?: true
Size: 651 Bytes
Versions: 49
Compression:
Stored size: 651 Bytes
Contents
# frozen_string_literal: true module Primer module Forms # :nodoc: class Select < BaseComponent delegate :builder, :form, to: :@input def initialize(input:) @input = input @input.add_input_classes( "FormControl-select", Primer::Forms::Dsl::Input::SIZE_MAPPINGS[@input.size] ) @field_wrap_arguments = { class: "FormControl-select-wrap", hidden: @input.hidden? } end def options @options ||= @input.options.map do |option| [option.label, option.value, option.system_arguments] end end end end end
Version data entries
49 entries across 49 versions & 2 rubygems