spotifyplaylistarchive.com/composables/canCopyToClipboard.ts
2022-09-03 16:29:38 +02:00

13 lines
337 B
TypeScript

const { isSupported } = useClipboard();
const clipboardWirtePermission = usePermission('clipboard-write');
const canCopyToClipboard = computed(
() => isSupported.value && clipboardWirtePermission.value === 'granted'
);
export const useCanCopyToClipboard = () => ({
isSupported,
clipboardWirtePermission,
canCopyToClipboard
});