Sha256: c282b6349bcc1c0275145740a561f057818cfd716c3f656b0008f42d90cb5130

Contents?: true

Size: 855 Bytes

Versions: 29

Compression:

Stored size: 855 Bytes

Contents

# frozen_string_literal: true

module Primer
  module Beta
    # @label BaseButton
    class BaseButtonPreview < ViewComponent::Preview
      # @label Playground
      #
      # @param type [Symbol] select [button, submit]
      # @param tag [Symbol] select [button, a, summary]
      # @param block [Boolean] toggle
      def playground(tag: :button, block: false, type: :button)
        render(Primer::Beta::BaseButton.new(tag: tag, block: block, type: type)) { "Button" }
      end

      # @label Default options
      #
      # @param type [Symbol] select [button, submit]
      # @param tag [Symbol] select [button, a, summary]
      # @param block [Boolean] toggle
      def default(tag: :button, block: false, type: :button)
        render(Primer::Beta::BaseButton.new(tag: tag, block: block, type: type)) { "Button" }
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

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