Sha256: 88f3aa9275f8e04b7a8147571c11cf421108838b78c8f204f8ebe8555e9a21f4
Contents?: true
Size: 716 Bytes
Versions: 55
Compression:
Stored size: 716 Bytes
Contents
# frozen_string_literal: true module Primer module Forms # :nodoc: class FormControl < BaseComponent delegate :builder, :form, to: :@input def initialize(input:, tag: :div, **system_arguments) @input = input @tag = tag @input.add_label_classes("FormControl-label") @form_group_arguments = { **system_arguments, class: class_names( system_arguments[:class], system_arguments[:classes], "FormControl", "width-full", "FormControl--fullWidth" => @input.full_width? ) } @form_group_arguments[:hidden] = "hidden" if @input.hidden? end end end end
Version data entries
55 entries across 55 versions & 2 rubygems