Sha256: 77a60c622fe1dbb234f4511a475144702c3fc00190b259ccbad2bf45227342c7

Contents?: true

Size: 704 Bytes

Versions: 7

Compression:

Stored size: 704 Bytes

Contents

# frozen_string_literal: true

module Primer
  module Alpha
    # @label UnderlinePanels
    class UnderlinePanelsPreview < ViewComponent::Preview
      # @label Default options
      #
      # @param number_of_panels [Integer] number
      # @param align [Symbol] select [left, right]
      def default(number_of_panels: 3, align: :left)
        render(Primer::Alpha::UnderlinePanels.new(label: "Test navigation", align: align)) do |c|
          Array.new(number_of_panels || 3) do |i|
            c.tab(selected: i.zero?, id: "tab-#{i + 1}") do |t|
              t.panel { "Panel #{i + 1}" }
              t.text { "Tab #{i + 1}" }
            end
          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/alpha/underline_panels_preview.rb
primer_view_components-0.0.103 previews/primer/alpha/underline_panels_preview.rb
primer_view_components-0.0.102 previews/primer/alpha/underline_panels_preview.rb
primer_view_components-0.0.101 previews/primer/alpha/underline_panels_preview.rb
primer_view_components-0.0.100 previews/primer/alpha/underline_panels_preview.rb
primer_view_components-0.0.99 previews/primer/alpha/underline_panels_preview.rb
primer_view_components-0.0.98 previews/primer/alpha/underline_panels_preview.rb