Sha256: 9fef5e0a4100eb17d622d81523e3a0a6c03e1968e065bc2a20774e5ba1959749
Contents?: true
Size: 871 Bytes
Versions: 53
Compression:
Stored size: 871 Bytes
Contents
# frozen_string_literal: true module Primer module Beta # @label Breadcrumbs class BreadcrumbsPreview < ViewComponent::Preview # @label Playground # # @param number_of_links [Integer] number def playground(number_of_links: 2) render(Primer::Beta::Breadcrumbs.new) do |component| Array.new(number_of_links || 3) do |i| component.with_item(href: "##{i}") { "Breadcrumb Item #{i + 1}" } end end end # @label Default options # # @param number_of_links [Integer] number # @snapshot def default(number_of_links: 2) render(Primer::Beta::Breadcrumbs.new) do |component| Array.new(number_of_links || 3) do |i| component.with_item(href: "##{i}") { "Breadcrumb Item #{i + 1}" } end end end end end end
Version data entries
53 entries across 53 versions & 2 rubygems