Skip to content

Commit 15e830f

Browse files
committed
fix: prevent title from being passed to the button element
1 parent 40a8e96 commit 15e830f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ export default function ShareButton<LinkOptions extends Record<string, unknown>>
122122
opts,
123123
resetButtonStyle = true,
124124
style,
125+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
126+
title, // deconstructed from ...rest to prevent passing it to the button element
125127
url,
126128
windowHeight = 400,
127129
windowPosition = 'windowCenter',

0 commit comments

Comments
 (0)