Class: Primer::ClipboardCopy
- Defined in:
- app/components/primer/clipboard_copy.rb
Overview
Use ‘ClipboardCopy` to copy element text content or input values to the clipboard.
Constant Summary
Constants included from Status::Dsl
Constants included from ViewHelper
Constants included from TestSelectorHelper
TestSelectorHelper::TEST_SELECTOR_TAG
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Instance Method Summary collapse
-
#initialize(label:, value:, **system_arguments) ⇒ ClipboardCopy
constructor
A new instance of ClipboardCopy.
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
Constructor Details
#initialize(label:, value:, **system_arguments) ⇒ ClipboardCopy
Returns a new instance of ClipboardCopy.
19 20 21 22 23 24 |
# File 'app/components/primer/clipboard_copy.rb', line 19 def initialize(label:, value:, **system_arguments) @system_arguments = system_arguments @system_arguments[:tag] = "clipboard-copy" @system_arguments[:value] = value @system_arguments[:"aria-label"] = label end |