Class: Primer::Beta::ClipboardCopyButton
Overview
‘ClipboardCopyButton` uses the `ClipboardCopy` component to copy text to the clipboard, styled as a Primer button. It can be used wherever a button is desired, and works well with components like `ButtonGroup`.
Constant Summary
Constants inherited from Button
Button::ALIGN_CONTENT_MAPPINGS, Button::ALIGN_CONTENT_OPTIONS, Button::DEFAULT_ALIGN_CONTENT, Button::DEFAULT_SCHEME, Button::DEFAULT_SIZE, Button::SCHEME_MAPPINGS, Button::SCHEME_OPTIONS, Button::SIZE_MAPPINGS, Button::SIZE_OPTIONS
Constants inherited from Component
Component::INVALID_ARIA_LABEL_TAGS
Constants included from Status::Dsl
Constants included from ViewHelper
Constants included from TestSelectorHelper
TestSelectorHelper::TEST_SELECTOR_TAG
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Constants included from AttributesHelper
AttributesHelper::PLURAL_ARIA_ATTRIBUTES, AttributesHelper::PLURAL_DATA_ATTRIBUTES
Instance Method Summary collapse
-
#initialize(**system_arguments) ⇒ ClipboardCopyButton
constructor
A new instance of ClipboardCopyButton.
Methods inherited from Component
Methods included from JoinStyleArgumentsHelper
Methods included from TestSelectorHelper
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean, #silence_deprecations?
Methods included from ClassNameHelper
Methods included from AttributesHelper
#aria, #data, #extract_data, #merge_aria, #merge_data, #merge_prefixed_attribute_hashes
Methods included from ExperimentalSlotHelpers
Methods included from ExperimentalRenderHelpers
Constructor Details
#initialize(**system_arguments) ⇒ ClipboardCopyButton
Returns a new instance of ClipboardCopyButton.
12 13 14 |
# File 'app/components/primer/beta/clipboard_copy_button.rb', line 12 def initialize(**system_arguments) super(**system_arguments, base_button_class: ClipboardCopyBaseButton) end |