Sha256: b590c8767bcc7c9bda1d685693770e342a16e05e426cb7d4626e307adc9dda7e
Contents?: true
Size: 853 Bytes
Versions: 20
Compression:
Stored size: 853 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 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
20 entries across 20 versions & 1 rubygems