Sha256: ccb65014c190605c5b99f4d66a8e81943c79c8b44a4406185851dddf26b1acc0

Contents?: true

Size: 899 Bytes

Versions: 138

Compression:

Stored size: 899 Bytes

Contents

# frozen_string_literal: true

module Primer
  module Alpha
    class Overlay
      # A `Overlay::Body` is a compositional component, used to render the
      # Body of an overlay. See <%= link_to_component(Primer::Alpha::Overlay) %>.
      class Body < Primer::Component
        # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
        def initialize(padding: DEFAULT_PADDING, **system_arguments)
          @system_arguments = deny_tag_argument(**system_arguments)
          @system_arguments[:tag] = :div
          @system_arguments[:classes] = class_names(
            "Overlay-body",
            PADDING_MAPPINGS[fetch_or_fallback(PADDING_OPTIONS, padding, DEFAULT_PADDING)],
            system_arguments[:classes]
          )
        end

        def call
          render(Primer::BaseComponent.new(**@system_arguments)) { content }
        end
      end
    end
  end
end

Version data entries

138 entries across 138 versions & 2 rubygems

Version Path
openproject-primer_view_components-0.33.0 app/components/primer/alpha/overlay/body.rb
primer_view_components-0.25.1 app/components/primer/alpha/overlay/body.rb
openproject-primer_view_components-0.32.1 app/components/primer/alpha/overlay/body.rb
openproject-primer_view_components-0.32.0 app/components/primer/alpha/overlay/body.rb
openproject-primer_view_components-0.29.1 app/components/primer/alpha/overlay/body.rb
openproject-primer_view_components-0.29.0 app/components/primer/alpha/overlay/body.rb
primer_view_components-0.23.0 app/components/primer/alpha/overlay/body.rb
openproject-primer_view_components-0.28.1 app/components/primer/alpha/overlay/body.rb
openproject-primer_view_components-0.28.0 app/components/primer/alpha/overlay/body.rb
openproject-primer_view_components-0.27.0 app/components/primer/alpha/overlay/body.rb
openproject-primer_view_components-0.26.0 app/components/primer/alpha/overlay/body.rb
openproject-primer_view_components-0.25.1 app/components/primer/alpha/overlay/body.rb
primer_view_components-0.22.0 app/components/primer/alpha/overlay/body.rb
primer_view_components-0.21.1 app/components/primer/alpha/overlay/body.rb
openproject-primer_view_components-0.25.0 app/components/primer/alpha/overlay/body.rb
openproject-primer_view_components-0.24.0 app/components/primer/alpha/overlay/body.rb
primer_view_components-0.21.0 app/components/primer/alpha/overlay/body.rb
primer_view_components-0.20.1 app/components/primer/alpha/overlay/body.rb
primer_view_components-0.20.0 app/components/primer/alpha/overlay/body.rb
openproject-primer_view_components-0.23.0 app/components/primer/alpha/overlay/body.rb