Sha256: 59a0685ccf4165c1b328d47d98307c8ffbf938842aa41089d9cc61061b7162d3

Contents?: true

Size: 500 Bytes

Versions: 7

Compression:

Stored size: 500 Bytes

Contents

# frozen_string_literal: true

module Primer
  module Beta
    # @label Breadcrumbs
    class BreadcrumbsPreview < ViewComponent::Preview
      # @label Default options
      #
      # @param number_of_links [Integer] number
      def default(number_of_links: 2)
        render(Primer::Beta::Breadcrumbs.new) do |component|
          Array.new(number_of_links || 3) do |i|
            component.item(href: "##{i}") { "Breadcrumb Item #{i + 1}" }
          end
        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/beta/breadcrumbs_preview.rb
primer_view_components-0.0.103 previews/primer/beta/breadcrumbs_preview.rb
primer_view_components-0.0.102 previews/primer/beta/breadcrumbs_preview.rb
primer_view_components-0.0.101 previews/primer/beta/breadcrumbs_preview.rb
primer_view_components-0.0.100 previews/primer/beta/breadcrumbs_preview.rb
primer_view_components-0.0.99 previews/primer/beta/breadcrumbs_preview.rb
primer_view_components-0.0.98 previews/primer/beta/breadcrumbs_preview.rb