Files
vault/ui/lib/core/addon/components/code-snippet.hbs
Jordan Reimer b6cce58e57 Code Snippet Updates (#22917)
* updates code-snippet component styling and adds it to ldap library accounts view

* adds comment back in to code-snippet template
2023-09-08 11:46:31 -06:00

22 lines
627 B
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}
<div
class="has-padding-s has-background-gray-900 border-radius-4 is-flex-between is-flex-center"
data-test-code-snippet
...attributes
>
<code class="has-text-white is-size-7">{{@codeBlock}}</code>
{{! replace with Hds::Copy::Button }}
<CopyButton
class="button is-compact is-transparent has-text-grey-light"
@clipboardText={{or @clipboardCode @codeBlock}}
@buttonType="button"
@success={{action (set-flash-message "Code copied!")}}
>
Copy
<Icon @name="clipboard-copy" aria-label="Copy" />
</CopyButton>
</div>