Sha256: 57ce34338028b8e5e1a1ee0fc8621b64ba377c888a0338d0241ac684dd849cf0

Contents?: true

Size: 672 Bytes

Versions: 87

Compression:

Stored size: 672 Bytes

Contents

# frozen_string_literal: true

module Primer
  module Forms
    # Wraps Primer::BaseComponent.
    class PrimerBaseComponentWrapper < BaseComponent
      include Primer::ClassNameHelper

      def initialize(**system_arguments)
        @system_arguments = system_arguments

        # Extract class and classes so they can be passed to Primer::BaseComponent
        # as classes:. The class: argument is expected by Rails, but Primer expects
        # classes:, reminiscent of HashWithIndifferentAccess shenanigans.
        @classes = class_names(
          system_arguments.delete(:classes),
          system_arguments.delete(:class)
        )
      end
    end
  end
end

Version data entries

87 entries across 87 versions & 2 rubygems

Version Path
openproject-primer_view_components-0.49.2 app/lib/primer/forms/primer_base_component_wrapper.rb
primer_view_components-0.35.2 app/lib/primer/forms/primer_base_component_wrapper.rb
openproject-primer_view_components-0.49.1 app/lib/primer/forms/primer_base_component_wrapper.rb
openproject-primer_view_components-0.49.0 app/lib/primer/forms/primer_base_component_wrapper.rb
primer_view_components-0.35.1 app/lib/primer/forms/primer_base_component_wrapper.rb
primer_view_components-0.35.0 app/lib/primer/forms/primer_base_component_wrapper.rb
openproject-primer_view_components-0.48.2 lib/primer/forms/primer_base_component_wrapper.rb
openproject-primer_view_components-0.48.1 lib/primer/forms/primer_base_component_wrapper.rb
openproject-primer_view_components-0.48.0 lib/primer/forms/primer_base_component_wrapper.rb
openproject-primer_view_components-0.47.1 lib/primer/forms/primer_base_component_wrapper.rb
openproject-primer_view_components-0.47.0 lib/primer/forms/primer_base_component_wrapper.rb
primer_view_components-0.34.0 lib/primer/forms/primer_base_component_wrapper.rb
openproject-primer_view_components-0.46.1 lib/primer/forms/primer_base_component_wrapper.rb
openproject-primer_view_components-0.46.0 lib/primer/forms/primer_base_component_wrapper.rb
openproject-primer_view_components-0.45.0 lib/primer/forms/primer_base_component_wrapper.rb
openproject-primer_view_components-0.44.3 lib/primer/forms/primer_base_component_wrapper.rb
openproject-primer_view_components-0.44.2 lib/primer/forms/primer_base_component_wrapper.rb
openproject-primer_view_components-0.44.1 lib/primer/forms/primer_base_component_wrapper.rb
primer_view_components-0.33.0 lib/primer/forms/primer_base_component_wrapper.rb
openproject-primer_view_components-0.44.0 lib/primer/forms/primer_base_component_wrapper.rb