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