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.43.1 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.43.0 previews/primer/beta/base_button_preview.rb
primer_view_components-0.32.0 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.42.0 previews/primer/beta/base_button_preview.rb
primer_view_components-0.31.0 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.41.1 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.41.0 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.40.0 previews/primer/beta/base_button_preview.rb
primer_view_components-0.30.0 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.39.1 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.39.0 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.38.0 previews/primer/beta/base_button_preview.rb
primer_view_components-0.29.0 previews/primer/beta/base_button_preview.rb
primer_view_components-0.28.0 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.37.1 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.37.0 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.36.2 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.36.1 previews/primer/beta/base_button_preview.rb
openproject-primer_view_components-0.36.0 previews/primer/beta/base_button_preview.rb
primer_view_components-0.27.0 previews/primer/beta/base_button_preview.rb