UI kit reference
hooks/useCopied
import { … } from 'zidane-ui'ui/src/hooks/useCopied.ts
Functions#
useCopiedFunction#
The copied state of one copy control. Stable callbacks; a copy while it shows starts the moment again.
function useCopied(): CopiedStateReturns
Constants#
COPIED_FEEDBACK_MSConstant#
How long a copy control shows that it copied.
const COPIED_FEEDBACK_MS = 1200Interfaces#
CopiedStateInterface#
What useCopied returns.
interface CopiedStateProperties
| Name | Type | Description |
|---|---|---|
| copied | boolean | A copy just happened: show the copied state. |
| copy | (text: string) => Promise<boolean> | Writes |
| markCopied | () => void | Shows the copied state for |