Sha256: 09c72c1ff2962bba780fedee299927e6074a1ce54ebe9780e79b2611cfdc961f

Contents?: true

Size: 717 Bytes

Versions: 2

Compression:

Stored size: 717 Bytes

Contents

# frozen_string_literal: true

module Ariadne
  module Form
    # :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

2 entries across 2 versions & 1 rubygems

Version Path
ariadne_view_components-0.0.65 app/components/ariadne/form/form_control/component.rb
ariadne_view_components-0.0.64 app/components/ariadne/form/form_control/component.rb