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 28, 2024
1 parent 8d264aa commit ac77d08
Show file tree
Hide file tree
Showing 2 changed files with 6 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": minor
---

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.
1 change: 1 addition & 0 deletions src/ShareButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export default function ShareButton<LinkOptions extends Record<string, unknown>>
opts,
resetButtonStyle = true,
style,
title, // deconstructed from ...rest to prevent passing it to the button element
url,
windowHeight = 400,
windowPosition = 'windowCenter',
Expand Down

0 comments on commit ac77d08

Please sign in to comment.