useClipboard

useClipboard is a custom hook to handle copying content to clipboard.

The useClipboard hook returns an object with the following fields:

NameTypeDefaultDescription
valuestringThe copied value
onCopyfunctionAction to copy content
hasCopiedbooleanfalseTrue if the content has been copied to clipboard.
import { useClipboard } from 'minerva-ui';

Usage