Sha256: 63f3e98c7ced882396cdf1594a15e3ead9fc9a4a02352815c5e09c3db125a082
Contents?: true
Size: 887 Bytes
Versions: 99
Compression:
Stored size: 887 Bytes
Contents
# frozen_string_literal: true module Primer module Beta # @label ClipboardCopyButton class ClipboardCopyButtonPreview < ViewComponent::Preview # @label Playground # # @param text [String] def playground(text: "Text to copy") render(Primer::Beta::ClipboardCopyButton.new(id: "clipboard-button", aria: { label: "Copy" }, value: text)) end # @label Playground # @snapshot def default render(Primer::Beta::ClipboardCopyButton.new(id: "clipboard-button", aria: { label: "Copy" }, value: "Text to copy")) end # @label With tooltip # @snapshot def with_tooltip render(Primer::Beta::ClipboardCopyButton.new(id: "clipboard-button", aria: { label: "Copy" }, value: "Text to copy")) do |button| button.with_tooltip(text: "Copy some text") end end end end end
Version data entries
99 entries across 99 versions & 2 rubygems