mirror of
https://github.com/imfing/hextra.git
synced 2025-06-19 23:31:25 -04:00
feat: allow enable/disable code block copy button (#331)
* refactor: move codeblock to a partial component * feat: add flags for code block copy button * allow disable code copy button completely * allow make the copy button always visible * chore: run build:css
This commit is contained in:
@ -25,7 +25,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
return svg;
|
||||
}
|
||||
|
||||
document.querySelectorAll('.code-copy-btn').forEach(function (button) {
|
||||
document.querySelectorAll('.hextra-code-copy-btn').forEach(function (button) {
|
||||
// Add copy and success icons
|
||||
button.querySelector('.copy-icon')?.appendChild(getCopyIcon());
|
||||
button.querySelector('.success-icon')?.appendChild(getSuccessIcon());
|
||||
|
Reference in New Issue
Block a user