Skip to content

Commit df04c88

Browse files
⚡ Add class for styleing
1 parent a96c43d commit df04c88

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/class/HTMLCodeBlockElement.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,10 @@ export default class HTMLCodeBlockElement extends HTMLElement {
108108

109109
await copy(value);
110110

111+
this.#copyButton.classList.add('--copied');
111112
this.#copyButton.textContent = 'Copied!';
112113
key = window.setTimeout(() => {
114+
this.#copyButton.classList.remove('--copied');
113115
this.#copyButton.textContent = 'Copy';
114116
}, 1500);
115117
};

0 commit comments

Comments
 (0)