diff --git a/package.json b/package.json index ef59358..5598594 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@risc0/ui", - "version": "0.0.55", + "version": "0.0.56", "sideEffects": false, "type": "module", "scripts": { diff --git a/utils/set-clipboard.ts b/utils/set-clipboard.ts deleted file mode 100644 index 57d5650..0000000 --- a/utils/set-clipboard.ts +++ /dev/null @@ -1,23 +0,0 @@ -// @ts-ignore -- not sure why this is not working -import { toast } from "sonner"; - -export interface SetClipboardParams { - onFailure?: () => void; - onSuccess?: () => void; - value: string; -} - -export const setClipboard = ({ - value, - onSuccess = () => toast.success("Copied to clipboard"), - onFailure = () => toast.error("Failed to copy to clipboard"), -}: SetClipboardParams) => { - navigator.clipboard - .writeText(value) - .then(() => { - onSuccess?.(); - }) - .catch(() => { - onFailure?.(); - }); -};