react-share
Advanced tools
Comparing version 5.0.4 to 5.1.0
@@ -13,2 +13,7 @@ import { CSSProperties } from 'react'; | ||
declare interface CustomProps<LinkOptions> { | ||
/** | ||
* Takes a function that returns a Promise to be fulfilled before calling | ||
* `onClick`. If you do not return promise, `onClick` is called immediately. | ||
*/ | ||
beforeOnClick?: () => Promise<void> | void; | ||
children: React_2.ReactNode; | ||
@@ -24,7 +29,16 @@ className?: string; | ||
forwardedRef?: Ref<HTMLButtonElement>; | ||
/** | ||
* Passes as the native `title` atribute for the `button` element. | ||
*/ | ||
htmlTitle?: HTMLButtonElement['title']; | ||
networkName: string; | ||
networkLink: NetworkLink<LinkOptions>; | ||
onClick?: (event: React_2.MouseEvent<HTMLButtonElement>, link: string) => void; | ||
/** | ||
* Takes a function to be called after closing share dialog. | ||
*/ | ||
onShareWindowClose?: () => void; | ||
openShareDialogOnClick?: boolean; | ||
opts: LinkOptions; | ||
resetButtonStyle?: boolean; | ||
/** | ||
@@ -38,12 +52,2 @@ * URL of the shared page | ||
windowPosition?: WindowPosition; | ||
/** | ||
* Takes a function that returns a Promise to be fulfilled before calling | ||
* `onClick`. If you do not return promise, `onClick` is called immediately. | ||
*/ | ||
beforeOnClick?: () => Promise<void> | void; | ||
/** | ||
* Takes a function to be called after closing share dialog. | ||
*/ | ||
onShareWindowClose?: () => void; | ||
resetButtonStyle?: boolean; | ||
} | ||
@@ -50,0 +54,0 @@ |
@@ -129,2 +129,3 @@ var __defProp = Object.defineProperty; | ||
forwardedRef, | ||
htmlTitle, | ||
networkLink, | ||
@@ -149,2 +150,3 @@ networkName, | ||
"forwardedRef", | ||
"htmlTitle", | ||
"networkLink", | ||
@@ -209,2 +211,3 @@ "networkName", | ||
style: newStyle, | ||
title: htmlTitle, | ||
children | ||
@@ -211,0 +214,0 @@ }) |
{ | ||
"name": "react-share", | ||
"version": "5.0.4", | ||
"version": "5.1.0", | ||
"description": "Social media share buttons and share counts for React.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
340059
2695