Skip to content

Commit 8994252

Browse files
committed
fix: prevent title from being passed to the button element
1 parent e0cca69 commit 8994252

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/late-horses-enjoy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-share": patch
3+
---
4+
5+
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.

src/ShareButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ export default function ShareButton<LinkOptions extends Record<string, unknown>>
126126
opts,
127127
resetButtonStyle = true,
128128
style,
129+
title, // deconstructed from ...rest to prevent passing it to the button element
129130
url,
130131
windowHeight = 400,
131132
windowPosition = 'windowCenter',

0 commit comments

Comments
 (0)