feat: version 1.0.0 (#21)
This commit is contained in:
@ -1,10 +1,14 @@
|
||||
import { useClipboard } from '@vueuse/core'
|
||||
import { showNotification } from './dialog'
|
||||
|
||||
export function useCopy() {
|
||||
const clipboard = useClipboard()
|
||||
|
||||
return (text: string) => {
|
||||
clipboard.copy(text)
|
||||
// TODO: show toast
|
||||
showNotification({
|
||||
message: 'Copied to clipboard',
|
||||
icon: 'carbon-copy',
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user