UNPKG

@gluestack-ui/hooks

Version:
20 lines (19 loc) 537 B
"use strict"; // import React from 'react'; // import Clipboard from '@react-native-community/clipboard'; // export function useClipboard() { // const [hasCopied, setHasCopied] = React.useState(false); // const [value, setValue] = React.useState<string>(''); // const onCopy = async (copiedValue: string) => { // if (Clipboard) { // await Clipboard.setString(copiedValue); // } // setValue(copiedValue); // setHasCopied(true); // }; // return { // value, // onCopy, // hasCopied, // }; // }