Sha256: 44586add84b9392cdec0b2a9cf8a0104c7886d123fdaa326513ffe99d07244a1

Contents?: true

Size: 606 Bytes

Versions: 120

Compression:

Stored size: 606 Bytes

Contents

# frozen_string_literal: true

module Primer
  module Beta
    # `Text` is a wrapper component that will apply typography styles to the text inside.
    class Text < Primer::Component
      status :beta

      DEFAULT_TAG = :span

      # @param tag [Symbol]
      # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
      def initialize(tag: DEFAULT_TAG, **system_arguments)
        @system_arguments = system_arguments
        @system_arguments[:tag] = tag
      end

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

Version data entries

120 entries across 120 versions & 2 rubygems

Version Path
openproject-primer_view_components-0.15.0 app/components/primer/beta/text.rb
openproject-primer_view_components-0.14.0 app/components/primer/beta/text.rb
openproject-primer_view_components-0.13.1 app/components/primer/beta/text.rb
primer_view_components-0.13.2 app/components/primer/beta/text.rb
primer_view_components-0.13.1 app/components/primer/beta/text.rb
openproject-primer_view_components-0.13.0 app/components/primer/beta/text.rb
primer_view_components-0.13.0 app/components/primer/beta/text.rb
primer_view_components-0.12.0 app/components/primer/beta/text.rb
primer_view_components-0.11.0 app/components/primer/beta/text.rb
openproject-primer_view_components-0.12.1 app/components/primer/beta/text.rb
primer_view_components-0.10.0 app/components/primer/beta/text.rb
openproject-primer_view_components-0.11.0 app/components/primer/beta/text.rb
openproject-primer_view_components-0.10.0 app/components/primer/beta/text.rb
primer_view_components-0.9.0 app/components/primer/beta/text.rb
openproject-primer_view_components-0.9.1 app/components/primer/beta/text.rb
openproject-primer_view_components-0.9.0 app/components/primer/beta/text.rb
openproject-primer_view_components-0.8.0 app/components/primer/beta/text.rb
primer_view_components-0.8.0 app/components/primer/beta/text.rb
primer_view_components-0.7.0 app/components/primer/beta/text.rb
openproject-primer_view_components-0.7.0 app/components/primer/beta/text.rb