Sha256: 61b9632bff40e1c1e4c02eb9d2e5c390917b1d3dd27062dcb1ee0071c3f4c7b1

Contents?: true

Size: 644 Bytes

Versions: 5

Compression:

Stored size: 644 Bytes

Contents

# frozen_string_literal: true

module Ariadne
  module Form
    # :nodoc:
    module Group
      class Component < Ariadne::Form::BaseComponent
        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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ariadne_view_components-0.0.70 app/components/ariadne/form/group/component.rb
ariadne_view_components-0.0.69 app/components/ariadne/form/group/component.rb
ariadne_view_components-0.0.68 app/components/ariadne/form/group/component.rb
ariadne_view_components-0.0.65 app/components/ariadne/form/group/component.rb
ariadne_view_components-0.0.64 app/components/ariadne/form/group/component.rb