Sha256: 7d401acc65547a8ea1afa2084968d89420e207eb9e333dd68666d1c4166b21a0

Contents?: true

Size: 1.04 KB

Versions: 116

Compression:

Stored size: 1.04 KB

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
      # @param disabled [Boolean]
      def playground(tag: :button, block: false, type: :button, disabled: false)
        render(Primer::Beta::BaseButton.new(tag: tag, block: block, type: type, disabled: disabled)) { "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

      # @label Disabled
      #
      def disabled
        render(Primer::Beta::BaseButton.new(disabled: true)) { "Button" }
      end
    end
  end
end

Version data entries

116 entries across 116 versions & 2 rubygems

Version Path
openproject-primer_view_components-0.49.2 previews/primer/beta/base_button_preview.rb
primer_view_components-0.35.2 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.49.1 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.49.0 previews/primer/beta/base_button_preview.rb
primer_view_components-0.35.1 previews/primer/beta/base_button_preview.rb
primer_view_components-0.35.0 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.48.2 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.48.1 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.48.0 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.47.1 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.47.0 previews/primer/beta/base_button_preview.rb
primer_view_components-0.34.0 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.46.1 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.46.0 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.45.0 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.44.3 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.44.2 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.44.1 previews/primer/beta/base_button_preview.rb
primer_view_components-0.33.0 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.44.0 previews/primer/beta/base_button_preview.rb