diff --git a/ui/app/styles/components/code-snippet.scss b/ui/app/styles/components/code-snippet.scss deleted file mode 100644 index 05c4e85c37..0000000000 --- a/ui/app/styles/components/code-snippet.scss +++ /dev/null @@ -1,20 +0,0 @@ -.code-snippet-container { - background-color: $ui-gray-900; - display: flex; - justify-content: space-between; - border-radius: $radius-large; - - code { - white-space: pre; - } -} - -.code-snippet-copy-button { - cursor: pointer; - color: $ui-gray-300; - background: none; - border: none; - box-shadow: none; - min-width: auto; - padding: $size-11 $size-8; -} diff --git a/ui/app/styles/core.scss b/ui/app/styles/core.scss index a104aded25..f181434d58 100644 --- a/ui/app/styles/core.scss +++ b/ui/app/styles/core.scss @@ -60,7 +60,6 @@ @import './components/box-radio'; @import './components/calendar-widget'; @import './components/codemirror'; -@import './components/code-snippet'; @import './components/confirm'; @import './components/console-ui-panel'; @import './components/control-group'; diff --git a/ui/lib/core/addon/components/code-snippet.hbs b/ui/lib/core/addon/components/code-snippet.hbs index a0b50d2d07..fd20c0cf1f 100644 --- a/ui/lib/core/addon/components/code-snippet.hbs +++ b/ui/lib/core/addon/components/code-snippet.hbs @@ -3,13 +3,15 @@ SPDX-License-Identifier: BUSL-1.1 ~}} -
- - {{@codeBlock}} - +
+ {{@codeBlock}} {{! replace with Hds::Copy::Button }} - -
-

All accounts

- {{#if @library.canCheckOut}} - - {{/if}} -
+
+
+ +
+

All accounts

+ {{#if @library.canCheckOut}} + + {{/if}} +
-

The accounts within this library

-
+

The accounts within this library

+
- - <:body as |Body|> - - {{Body.data.account}} - - - - - - -
+ + <:body as |Body|> + + {{Body.data.account}} + + + + + + + +
-
+
-
- {{this.cliCommand}} - - Copy - - -
+
diff --git a/ui/tests/integration/components/ldap/page/library/details/accounts-test.js b/ui/tests/integration/components/ldap/page/library/details/accounts-test.js index eb7670bc98..add8a8a691 100644 --- a/ui/tests/integration/components/ldap/page/library/details/accounts-test.js +++ b/ui/tests/integration/components/ldap/page/library/details/accounts-test.js @@ -77,8 +77,7 @@ module('Integration | Component | ldap | Page::Library::Details::Accounts', func assert.dom('[data-test-checked-out-card]').exists('Accounts checked out card renders'); assert - .dom('[data-test-cli-command]') + .dom('[data-test-code-snippet] code') .hasText('vault lease renew ad/library/test-library/check-out/:lease_id', 'Renew cli command renders'); - assert.dom(`[data-test-cli-command-copy]`).exists('Renew cli command copy button renders'); }); });