Sha256: 22752fb91e42b1b43c761475a162ea2dfd633d224f39d1d74f09017f5022bb1b

Contents?: true

Size: 756 Bytes

Versions: 7

Compression:

Stored size: 756 Bytes

Contents

# frozen_string_literal: true

module Primer
  # @label SubheadComponent
  class SubheadComponentPreview < ViewComponent::Preview
    # @label Default Options
    #
    # @param spacious [Boolean]
    # @param hide_border [Boolean]
    # @param heading_danger [Boolean]
    # @param heading_tag [Symbol] select [div, h1, h2, h3, h4, h5, h6]
    def default(spacious: false, hide_border: false, heading_tag: :div, heading_danger: false)
      render(Primer::SubheadComponent.new(spacious: spacious, hide_border: hide_border)) do |component|
        component.with_heading(tag: heading_tag, danger: heading_danger) do
          "My Heading"
        end
        component.with_description do
          "My Description"
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
primer_view_components-0.0.104 previews/primer/subhead_component_preview.rb
primer_view_components-0.0.103 previews/primer/subhead_component_preview.rb
primer_view_components-0.0.102 previews/primer/subhead_component_preview.rb
primer_view_components-0.0.101 previews/primer/subhead_component_preview.rb
primer_view_components-0.0.100 previews/primer/subhead_component_preview.rb
primer_view_components-0.0.99 previews/primer/subhead_component_preview.rb
primer_view_components-0.0.98 previews/primer/subhead_component_preview.rb