Sha256: bfaa056c542435fc1b6d334de9b2497e0a7f3058dae77f254811a475afccdaf0

Contents?: true

Size: 943 Bytes

Versions: 12

Compression:

Stored size: 943 Bytes

Contents

# frozen_string_literal: true

module Primer
  module Beta
    # @label ButtonGroup
    class ButtonGroupPreview < ViewComponent::Preview
      # @label Playground
      #
      # @param size [Symbol] select [medium, small]
      def playground(size: :medium)
        render(Primer::Beta::ButtonGroup.new(size: size)) do |c|
          c.button { "Button" }
          c.button(scheme: :primary) { "Primary" }
          c.button(scheme: :danger) { "Danger" }
          c.button(scheme: :outline) { "Outline" }
        end
      end

      # @label Default options
      #
      # @param size [Symbol] select [medium, small]
      def default(size: :medium)
        render(Primer::Beta::ButtonGroup.new(size: size)) do |c|
          c.button { "Button" }
          c.button(scheme: :primary) { "Primary" }
          c.button(scheme: :danger) { "Danger" }
          c.button(scheme: :outline) { "Outline" }
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
primer_view_components-0.0.116 previews/primer/beta/button_group_preview.rb
primer_view_components-0.0.115 previews/primer/beta/button_group_preview.rb
primer_view_components-0.0.114 previews/primer/beta/button_group_preview.rb
primer_view_components-0.0.113 previews/primer/beta/button_group_preview.rb
primer_view_components-0.0.112 previews/primer/beta/button_group_preview.rb
primer_view_components-0.0.111 previews/primer/beta/button_group_preview.rb
primer_view_components-0.0.110 previews/primer/beta/button_group_preview.rb
primer_view_components-0.0.109 previews/primer/beta/button_group_preview.rb
primer_view_components-0.0.108 previews/primer/beta/button_group_preview.rb
primer_view_components-0.0.107 previews/primer/beta/button_group_preview.rb
primer_view_components-0.0.106 previews/primer/beta/button_group_preview.rb
primer_view_components-0.0.105 previews/primer/beta/button_group_preview.rb