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