Skip to content

Commit b51078d

Browse files
aljadandanoc
andauthored
Rename the default export function to useClipboard (#71)
Co-authored-by: Daniel O’Connor <[email protected]>
1 parent a5ee89f commit b51078d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/seven-buckets-draw.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-use-clipboard": patch
3+
---
4+
5+
Rename the default export function to `useClipboard` instead of `useCopyClipboard` for consistency with the package name.

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ interface IOptions {
99
successDuration?: number;
1010
}
1111

12-
export default function useCopyClipboard(
12+
export default function useClipboard(
1313
text: string,
1414
options?: IOptions
1515
): [boolean, () => void] {

0 commit comments

Comments
 (0)