@gluestack-ui/hooks
Version:
Provides hooks used in gluestack-ui
20 lines (19 loc) • 537 B
JavaScript
// 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,
// };
// }
;