4
0
mirror of https://github.com/AzuraCast/AzuraCast.git synced 2024-06-14 13:16:37 +00:00
AzuraCast/frontend/vue/vendor/clipboard.js
2022-12-12 12:39:00 -06:00

24 lines
446 B
JavaScript

import VueClipboard, {copyText} from 'vue3-clipboard';
export function copyToClipboard(text) {
copyText(
text,
undefined,
(error) => {
if (error) {
console.error(error)
}
}
);
}
export default function useVueClipboard(vueApp) {
vueApp.use(
VueClipboard,
{
autoSetContainer: true,
appendToBody: true,
}
);
};