mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-01 19:45:23 +02:00
feat: add copy button to code block
This commit is contained in:
parent
dc0c32a93f
commit
1c3ada993e
2 changed files with 29 additions and 4 deletions
|
@ -1,4 +1,12 @@
|
|||
<div class="block-code">
|
||||
<div class="block-code__content">{{ code|escape }}</div>
|
||||
<div class="block-code__wrapper">
|
||||
<div class="block-code__content">{{ code | escape }}</div>
|
||||
</div>
|
||||
{%
|
||||
include 'components/copy-button.twig' with {
|
||||
ariaLabel: 'Copy Code to Clipboard',
|
||||
class: 'block-code__copy-button',
|
||||
textToCopy: code | escape,
|
||||
}
|
||||
%}
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue