Sha256: cfb940d3d757fbaa4abb6193c457f53e7864db69ef8d10d96dab38f971beb18f

Contents?: true

Size: 714 Bytes

Versions: 2

Compression:

Stored size: 714 Bytes

Contents

# frozen_string_literal: true

module Ariadne
  module Form
    # :nodoc:
    module Group
      module Component
        class Component < Ariadne::Form::BaseInputComponent
          VERTICAL = :vertical
          HORIZONTAL = :horizontal
          DEFAULT_LAYOUT = VERTICAL
          LAYOUTS = [VERTICAL, HORIZONTAL].freeze

          def initialize(inputs:, builder:, form:, layout: DEFAULT_LAYOUT, **system_arguments)
            @inputs = inputs
            @builder = builder
            @form = form
            @layout = layout
            @system_arguments = system_arguments
          end

          def horizontal?
            @layout == HORIZONTAL
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ariadne_view_components-0.0.67 app/components/ariadne/form/group/component.rb
ariadne_view_components-0.0.66 app/components/ariadne/form/group/component.rb