Skip to content

Commit

Permalink
Rename the default export function to useClipboard (#71)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel O’Connor <daniel@danoc.me>
  • Loading branch information
aljadan and danoc committed Oct 10, 2022
1 parent a5ee89f commit b51078d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/seven-buckets-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-use-clipboard": patch
---

Rename the default export function to `useClipboard` instead of `useCopyClipboard` for consistency with the package name.
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface IOptions {
successDuration?: number;
}

export default function useCopyClipboard(
export default function useClipboard(
text: string,
options?: IOptions
): [boolean, () => void] {
Expand Down

0 comments on commit b51078d

Please sign in to comment.