Sha256: 426b695dafe94d42b50b0aa444887020e12d233107796b9fbec37500b1e56237

Contents?: true

Size: 1.04 KB

Versions: 17

Compression:

Stored size: 1.04 KB

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 |component|
          component.with_button { "Button" }
          component.with_button(scheme: :primary) { "Primary" }
          component.with_button(scheme: :danger) { "Danger" }
          component.with_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 |component|
          component.with_button { "Button" }
          component.with_button(scheme: :primary) { "Primary" }
          component.with_button(scheme: :danger) { "Danger" }
          component.with_button(scheme: :outline) { "Outline" }
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
primer_view_components-0.1.9 previews/primer/beta/button_group_preview.rb
primer_view_components-0.1.8 previews/primer/beta/button_group_preview.rb
primer_view_components-0.1.7 previews/primer/beta/button_group_preview.rb
primer_view_components-0.1.6 previews/primer/beta/button_group_preview.rb
primer_view_components-0.1.5 previews/primer/beta/button_group_preview.rb
primer_view_components-0.1.4 previews/primer/beta/button_group_preview.rb
primer_view_components-0.1.3 previews/primer/beta/button_group_preview.rb
primer_view_components-0.1.2 previews/primer/beta/button_group_preview.rb
primer_view_components-0.1.1 previews/primer/beta/button_group_preview.rb
primer_view_components-0.1.0 previews/primer/beta/button_group_preview.rb
primer_view_components-0.0.123 previews/primer/beta/button_group_preview.rb
primer_view_components-0.0.122 previews/primer/beta/button_group_preview.rb
primer_view_components-0.0.121 previews/primer/beta/button_group_preview.rb
primer_view_components-0.0.120 previews/primer/beta/button_group_preview.rb
primer_view_components-0.0.119 previews/primer/beta/button_group_preview.rb
primer_view_components-0.0.118 previews/primer/beta/button_group_preview.rb
primer_view_components-0.0.117 previews/primer/beta/button_group_preview.rb