mirror of https://github.com/hashicorp/consul
5fb9df1640
* Adding explicit MPL license for sub-package This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Adding explicit MPL license for sub-package This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Updating the license from MPL to Business Source License Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at <Blog URL>, FAQ at www.hashicorp.com/licensing-faq, and details of the license at www.hashicorp.com/bsl. * add missing license headers * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> |
||
---|---|---|
.. | ||
README.mdx | ||
chart.xstate.js | ||
index.hbs | ||
index.js | ||
index.scss | ||
layout.scss | ||
skin.scss |
README.mdx
# CopyButton Button component used for copy-to-clipboard functionality so the user can easily copy specified text to their clipboard, along with tooltip-like notifications so the user has some sort of feedback to know the value has been copied. This component is essentially a composition of our `{{with-copyable}}` modifier, our `{{tooltip}}` modifier plus specific Consul-flavored visual treatment. This is all glued together with our `<StateChart />` component to manage states. Can be used inline to render only a small icon for the button with no other text. ```hbs preview-template <figure> <figcaption>Icon only</figcaption> <CopyButton @value={{'stringToCopy'}} @name="Thing" /> </figure> <figure> <figcaption>Icon and text</figcaption> <CopyButton @value={{'stringToCopy'}} @name="Thing" > Copy me! </CopyButton> </figure> ``` ## Arguments | Argument | Type | Default | Description | | --- | --- | --- | --- | | `value` | `String` | | The string to be copied to the clipboard on click | | `name` | `String` | | The 'Name' of the string to be copied. Mainly used for accessibility reasons and giving feedback to the user | ## See - [Component Source Code](./index.js) - [Template Source Code](./index.hbs) ---