1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-01 17:32:41 +02:00

Enhance the javascript

This commit is contained in:
louismaxime.piton
2023-10-23 17:06:39 +02:00
parent aad8c9e353
commit 930867b09a
4 changed files with 19 additions and 19 deletions

View File

@@ -17,6 +17,7 @@
// Insert copy to clipboard button before .highlight
const btnTitle = 'Copy to clipboard'
const btnEdit = 'Edit on StackBlitz'
// const btnTheme = 'Toggle local theme'
const btnHtml = [
'<div class="bd-code-snippet">',
@@ -51,6 +52,7 @@
snippetButtonTooltip('.btn-clipboard', btnTitle)
snippetButtonTooltip('.btn-edit', btnEdit)
// snippetButtonTooltip('.btn-theme', btnTheme)
const clipboard = new ClipboardJS('.btn-clipboard', {
target: trigger => trigger.closest('.bd-code-snippet').querySelector('.highlight'),