Skip to content

Commit

Permalink
fix: prevent title from being passed to the button element
Browse files Browse the repository at this point in the history
  • Loading branch information
nygardk committed Feb 2, 2025
1 parent 40a8e96 commit 15e830f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/late-horses-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-share": patch
---

The `title` prop is no longer passed to the `button` element, which may have caused e.g. warnings in the console before. Note that to set the native `title` attribute for the share buttons, you may use the `htmlTitle` prop.
2 changes: 2 additions & 0 deletions src/ShareButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ export default function ShareButton<LinkOptions extends Record<string, unknown>>
opts,
resetButtonStyle = true,
style,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
title, // deconstructed from ...rest to prevent passing it to the button element
url,
windowHeight = 400,
windowPosition = 'windowCenter',
Expand Down

0 comments on commit 15e830f

Please sign in to comment.