import React, { Component, Ref } from 'react'; type NetworkLink = (url: string, options: LinkOptions) => string; type WindowPosition = 'windowCenter' | 'screenCenter'; interface CustomProps { children: React.ReactNode; /** * Disables click action and adds `disabled` class */ disabled?: boolean; /** * Style when button is disabled * @default { opacity: 0.6 } */ disabledStyle?: React.CSSProperties; forwardedRef?: Ref; networkName: string; networkLink: NetworkLink; onClick?: (event: React.MouseEvent, link: string) => void; openShareDialogOnClick?: boolean; opts: LinkOptions; /** * URL of the shared page */ url: string; style?: React.CSSProperties; windowWidth?: number; windowHeight?: number; 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; /** * Takes a function to be called after closing share dialog. */ onShareWindowClose?: () => void; resetButtonStyle?: boolean; blankTarget?: boolean; } export type Props = Omit, keyof CustomProps> & CustomProps; export default class SocialShareButton extends Component> { static defaultProps: { disabledStyle: { opacity: number; }; openShareDialogOnClick: boolean; resetButtonStyle: boolean; }; openShareDialog: (link: string) => void; handleClick: (event: React.MouseEvent) => Promise; render(): React.JSX.Element; } export {};