Sha256: 51466311a003b9837a5f38496b0cbbfbb2705dc83ef0083bfa2efea500c4d71f

Contents?: true

Size: 273 Bytes

Versions: 10

Compression:

Stored size: 273 Bytes

Contents

# frozen_string_literal: true

module Primer
  class HeadingComponent < Primer::Component
    def initialize(**kwargs)
      @kwargs = kwargs
      @kwargs[:tag] ||= :h1
    end

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
primer_view_components-0.0.12 app/components/primer/heading_component.rb
primer_view_components-0.0.11 app/components/primer/heading_component.rb
primer_view_components-0.0.10 app/components/primer/heading_component.rb
primer_view_components-0.0.9 app/components/primer/heading_component.rb
primer_view_components-0.0.8 app/components/primer/heading_component.rb
primer_view_components-0.0.7 app/components/primer/heading_component.rb
primer_view_components-0.0.6 app/components/primer/heading_component.rb
primer_view_components-0.0.5 app/components/primer/heading_component.rb
primer_view_components-0.0.4 app/components/primer/heading_component.rb
primer_view_components-0.0.3 app/components/primer/heading_component.rb