parent
9a8a3a9f89
commit
63e38e723a
@ -0,0 +1,16 @@ |
||||
import ClipboardJS from 'clipboard' |
||||
import $ from 'jquery' |
||||
|
||||
const clipboard = new ClipboardJS('[data-clipboard-text]') |
||||
|
||||
clipboard.on('success', ({trigger})=> { |
||||
const copyButton = $(trigger) |
||||
copyButton.tooltip({ |
||||
title: 'Copied!', |
||||
trigger: 'click', |
||||
placement: 'top' |
||||
}).tooltip('show') |
||||
setTimeout(()=> { |
||||
copyButton.tooltip('dispose') |
||||
}, 1000) |
||||
}); |
Loading…
Reference in new issue