Sha256: cf25b80c3bdf7ca06764a7a27d190dd0298640b300d953c915d44c2fac69a4b9
Contents?: true
Size: 701 Bytes
Versions: 79
Compression:
Stored size: 701 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
79 entries across 79 versions & 2 rubygems