UNPKG

17.6 kBTypeScriptView Raw
1import { default as default_2 } from 'react';
2import { FC } from 'react';
3import { ForwardRefExoticComponent } from 'react';
4import { HTMLAttributes } from 'react';
5import { JSX as JSX_2 } from 'react/jsx-runtime';
6import { RefAttributes } from 'react';
7import { SVGProps } from 'react';
8
9export declare const BlueskyIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
10bgStyle?: React.CSSProperties;
11borderRadius?: number;
12iconFillColor?: string;
13round?: boolean;
14size?: number | string;
15}>;
16
17export declare const BlueskyShareButton: ForwardRefExoticComponent<Omit<Props< {
18title?: string;
19separator?: string;
20}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & {
21title?: string;
22separator?: string;
23} & RefAttributes<HTMLButtonElement>>;
24
25export declare const EmailIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
26bgStyle?: React.CSSProperties;
27borderRadius?: number;
28iconFillColor?: string;
29round?: boolean;
30size?: number | string;
31}>;
32
33export declare const EmailShareButton: default_2.ForwardRefExoticComponent<Omit<Props<Options>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & Options & default_2.RefAttributes<HTMLButtonElement>>;
34
35export declare const FacebookIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
36bgStyle?: React.CSSProperties;
37borderRadius?: number;
38iconFillColor?: string;
39round?: boolean;
40size?: number | string;
41}>;
42
43export declare const FacebookMessengerIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
44bgStyle?: React.CSSProperties;
45borderRadius?: number;
46iconFillColor?: string;
47round?: boolean;
48size?: number | string;
49}>;
50
51export declare const FacebookMessengerShareButton: ForwardRefExoticComponent<Omit<Props<Options_2>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & Options_2 & RefAttributes<HTMLButtonElement>>;
52
53export declare const FacebookShareButton: ForwardRefExoticComponent<Omit<Props< {
54hashtag?: string;
55}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & {
56hashtag?: string;
57} & RefAttributes<HTMLButtonElement>>;
58
59export declare const FacebookShareCount: {
60 (props: Omit<Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
61 children?: (shareCount: number) => React.ReactNode;
62 getCount: (url: string, callback: (shareCount?: number) => void) => void;
63 url: string;
64 }, "getCount">): JSX_2.Element;
65 displayName: string;
66};
67
68export declare const GabIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
69bgStyle?: React.CSSProperties;
70borderRadius?: number;
71iconFillColor?: string;
72round?: boolean;
73size?: number | string;
74}>;
75
76export declare const GabShareButton: ForwardRefExoticComponent<Omit<Props< {
77title?: string;
78}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & {
79title?: string;
80} & RefAttributes<HTMLButtonElement>>;
81
82export declare const HatenaIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
83bgStyle?: React.CSSProperties;
84borderRadius?: number;
85iconFillColor?: string;
86round?: boolean;
87size?: number | string;
88}>;
89
90export declare const HatenaShareButton: ForwardRefExoticComponent<Omit<Props< {
91title?: string;
92}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & {
93title?: string;
94} & RefAttributes<HTMLButtonElement>>;
95
96export declare const HatenaShareCount: {
97 (props: Omit<Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
98 children?: (shareCount: number) => React.ReactNode;
99 getCount: (url: string, callback: (shareCount?: number) => void) => void;
100 url: string;
101 }, "getCount">): JSX_2.Element;
102 displayName: string;
103};
104
105export declare const InstapaperIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
106bgStyle?: React.CSSProperties;
107borderRadius?: number;
108iconFillColor?: string;
109round?: boolean;
110size?: number | string;
111}>;
112
113export declare const InstapaperShareButton: ForwardRefExoticComponent<Omit<Props< {
114title?: string;
115description?: string;
116}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & {
117title?: string;
118description?: string;
119} & RefAttributes<HTMLButtonElement>>;
120
121export declare const LineIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
122bgStyle?: React.CSSProperties;
123borderRadius?: number;
124iconFillColor?: string;
125round?: boolean;
126size?: number | string;
127}>;
128
129export declare const LineShareButton: ForwardRefExoticComponent<Omit<Props< {
130title?: string;
131}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & {
132title?: string;
133} & RefAttributes<HTMLButtonElement>>;
134
135export declare const LinkedinIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
136bgStyle?: React.CSSProperties;
137borderRadius?: number;
138iconFillColor?: string;
139round?: boolean;
140size?: number | string;
141}>;
142
143export declare const LinkedinShareButton: ForwardRefExoticComponent<Omit<Props<Options_3>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & Options_3 & RefAttributes<HTMLButtonElement>>;
144
145export declare const LivejournalIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
146bgStyle?: React.CSSProperties;
147borderRadius?: number;
148iconFillColor?: string;
149round?: boolean;
150size?: number | string;
151}>;
152
153export declare const LivejournalShareButton: ForwardRefExoticComponent<Omit<Props< {
154title?: string;
155description?: string;
156}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & {
157title?: string;
158description?: string;
159} & RefAttributes<HTMLButtonElement>>;
160
161export declare const MailruIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
162bgStyle?: React.CSSProperties;
163borderRadius?: number;
164iconFillColor?: string;
165round?: boolean;
166size?: number | string;
167}>;
168
169export declare const MailruShareButton: ForwardRefExoticComponent<Omit<Props< {
170title?: string;
171description?: string;
172imageUrl?: string;
173}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & {
174title?: string;
175description?: string;
176imageUrl?: string;
177} & RefAttributes<HTMLButtonElement>>;
178
179declare type NetworkLink<LinkOptions> = (url: string, options: LinkOptions) => string;
180
181export declare const OKIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
182bgStyle?: React.CSSProperties;
183borderRadius?: number;
184iconFillColor?: string;
185round?: boolean;
186size?: number | string;
187}>;
188
189export declare const OKShareButton: ForwardRefExoticComponent<Omit<Props< {
190title?: string;
191description?: string;
192image?: string;
193}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & {
194title?: string;
195description?: string;
196image?: string;
197} & RefAttributes<HTMLButtonElement>>;
198
199export declare const OKShareCount: {
200 (props: Omit<Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
201 children?: (shareCount: number) => React.ReactNode;
202 getCount: (url: string, callback: (shareCount?: number) => void) => void;
203 url: string;
204 }, "getCount">): JSX_2.Element;
205 displayName: string;
206};
207
208declare type Options = {
209 body?: string;
210 separator?: string;
211 subject?: string;
212};
213
214declare type Options_2 = {
215 /** Your app's unique identifier. */
216 appId: string;
217 /** The URL to redirect to after a person clicks a button on the dialog.
218 * Required when using URL redirection. */
219 redirectUri?: string;
220 /** A user ID of a recipient. Once the dialog comes up, the sender can
221 * specify additional people as recipients. */
222 to?: string;
223};
224
225declare type Options_3 = {
226 /** The url-encoded title value that you wish you use. */
227 title?: string;
228 /** The url-encoded description that you wish you use. */
229 summary?: string;
230 /** The url-encoded source of the content (e.g. your website or application name) */
231 source?: string;
232};
233
234declare type Options_4 = {
235 title?: string;
236 caption?: string;
237 posttype?: 'link' | string;
238};
239
240declare type Options_5 = {
241 title?: string;
242 image?: string;
243 noParse?: boolean;
244 noVkLinks?: boolean;
245};
246
247export declare const PinterestIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
248bgStyle?: React.CSSProperties;
249borderRadius?: number;
250iconFillColor?: string;
251round?: boolean;
252size?: number | string;
253}>;
254
255export declare const PinterestShareButton: ForwardRefExoticComponent<Omit<Props<PinterestShareProps>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & PinterestShareProps & RefAttributes<HTMLButtonElement>>;
256
257export declare const PinterestShareCount: {
258 (props: Omit<Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
259 children?: (shareCount: number) => React.ReactNode;
260 getCount: (url: string, callback: (shareCount?: number) => void) => void;
261 url: string;
262 }, "getCount">): JSX_2.Element;
263 displayName: string;
264};
265
266declare type PinterestShareProps = {
267 media: string;
268 description?: string;
269 pinId?: string;
270};
271
272export declare const PocketIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
273bgStyle?: React.CSSProperties;
274borderRadius?: number;
275iconFillColor?: string;
276round?: boolean;
277size?: number | string;
278}>;
279
280export declare const PocketShareButton: ForwardRefExoticComponent<Omit<Props< {
281title?: string;
282}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & {
283title?: string;
284} & RefAttributes<HTMLButtonElement>>;
285
286declare interface Props<LinkOptions> extends Omit<default_2.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'> {
287 /**
288 * Takes a function that returns a Promise to be fulfilled before calling
289 * `onClick`. If you do not return promise, `onClick` is called immediately.
290 */
291 beforeOnClick?: () => Promise<void> | void;
292 children: default_2.ReactNode;
293 className?: string;
294 /** Disables click action and adds `disabled` class */
295 disabled?: boolean;
296 /**
297 * Style when button is disabled
298 * @default { opacity: 0.6 }
299 */
300 disabledStyle?: default_2.CSSProperties;
301 forwardedRef?: default_2.Ref<HTMLButtonElement>;
302 /**
303 * Passes as the native `title` atribute for the `button` element.
304 */
305 htmlTitle?: HTMLButtonElement['title'];
306 networkName: string;
307 networkLink: NetworkLink<LinkOptions>;
308 onClick?: (event: default_2.MouseEvent<HTMLButtonElement>, link: string) => void;
309 /**
310 * Takes a function to be called after closing share dialog.
311 */
312 onShareWindowClose?: () => void;
313 openShareDialogOnClick?: boolean;
314 opts: LinkOptions;
315 resetButtonStyle?: boolean;
316 /**
317 * URL of the shared page
318 */
319 url: string;
320 style?: default_2.CSSProperties;
321 windowWidth?: number;
322 windowHeight?: number;
323 windowPosition?: WindowPosition;
324}
325
326export declare const RedditIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
327bgStyle?: React.CSSProperties;
328borderRadius?: number;
329iconFillColor?: string;
330round?: boolean;
331size?: number | string;
332}>;
333
334export declare const RedditShareButton: ForwardRefExoticComponent<Omit<Props< {
335title?: string;
336}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & {
337title?: string;
338} & RefAttributes<HTMLButtonElement>>;
339
340export declare const RedditShareCount: {
341 (props: Omit<Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
342 children?: (shareCount: number) => React.ReactNode;
343 getCount: (url: string, callback: (shareCount?: number) => void) => void;
344 url: string;
345 }, "getCount">): JSX_2.Element;
346 displayName: string;
347};
348
349export declare const TelegramIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
350bgStyle?: React.CSSProperties;
351borderRadius?: number;
352iconFillColor?: string;
353round?: boolean;
354size?: number | string;
355}>;
356
357export declare const TelegramShareButton: ForwardRefExoticComponent<Omit<Props< {
358title?: string;
359}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & {
360title?: string;
361} & RefAttributes<HTMLButtonElement>>;
362
363export declare const ThreadsIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
364bgStyle?: React.CSSProperties;
365borderRadius?: number;
366iconFillColor?: string;
367round?: boolean;
368size?: number | string;
369}>;
370
371export declare const ThreadsShareButton: ForwardRefExoticComponent<Omit<Props< {
372title?: string;
373via?: string;
374hashtags?: string[];
375related?: string[];
376}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & {
377title?: string;
378via?: string;
379hashtags?: string[];
380related?: string[];
381} & RefAttributes<HTMLButtonElement>>;
382
383export declare const TumblrIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
384bgStyle?: React.CSSProperties;
385borderRadius?: number;
386iconFillColor?: string;
387round?: boolean;
388size?: number | string;
389}>;
390
391export declare const TumblrShareButton: ForwardRefExoticComponent<Omit<Props<Options_4 & {
392tags: string;
393}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & Options_4 & {
394tags?: string[];
395} & RefAttributes<HTMLButtonElement>>;
396
397export declare const TumblrShareCount: {
398 (props: Omit<Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
399 children?: (shareCount: number) => React.ReactNode;
400 getCount: (url: string, callback: (shareCount?: number) => void) => void;
401 url: string;
402 }, "getCount">): JSX_2.Element;
403 displayName: string;
404};
405
406export declare const TwitterIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
407bgStyle?: React.CSSProperties;
408borderRadius?: number;
409iconFillColor?: string;
410round?: boolean;
411size?: number | string;
412}>;
413
414export declare const TwitterShareButton: ForwardRefExoticComponent<Omit<Props< {
415title?: string;
416via?: string;
417hashtags?: string[];
418related?: string[];
419}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & {
420title?: string;
421via?: string;
422hashtags?: string[];
423related?: string[];
424} & RefAttributes<HTMLButtonElement>>;
425
426export declare const ViberIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
427bgStyle?: React.CSSProperties;
428borderRadius?: number;
429iconFillColor?: string;
430round?: boolean;
431size?: number | string;
432}>;
433
434export declare const ViberShareButton: ForwardRefExoticComponent<Omit<Props< {
435title?: string;
436separator?: string;
437}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & {
438title?: string;
439separator?: string;
440} & RefAttributes<HTMLButtonElement>>;
441
442export declare const VKIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
443bgStyle?: React.CSSProperties;
444borderRadius?: number;
445iconFillColor?: string;
446round?: boolean;
447size?: number | string;
448}>;
449
450export declare const VKShareButton: ForwardRefExoticComponent<Omit<Props<Options_5>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & Options_5 & RefAttributes<HTMLButtonElement>>;
451
452export declare const VKShareCount: {
453 (props: Omit<Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
454 children?: (shareCount: number) => React.ReactNode;
455 getCount: (url: string, callback: (shareCount?: number) => void) => void;
456 url: string;
457 }, "getCount">): JSX_2.Element;
458 displayName: string;
459};
460
461export declare const WeiboIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
462bgStyle?: React.CSSProperties;
463borderRadius?: number;
464iconFillColor?: string;
465round?: boolean;
466size?: number | string;
467}>;
468
469export declare const WeiboShareButton: ForwardRefExoticComponent<Omit<Props< {
470title?: string;
471image?: string;
472}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & {
473title?: string;
474image?: string;
475} & RefAttributes<HTMLButtonElement>>;
476
477export declare const WhatsappIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
478bgStyle?: React.CSSProperties;
479borderRadius?: number;
480iconFillColor?: string;
481round?: boolean;
482size?: number | string;
483}>;
484
485export declare const WhatsappShareButton: ForwardRefExoticComponent<Omit<Props< {
486title?: string;
487separator?: string;
488}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & {
489title?: string;
490separator?: string;
491} & RefAttributes<HTMLButtonElement>>;
492
493declare type WindowPosition = 'windowCenter' | 'screenCenter';
494
495export declare const WorkplaceIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
496bgStyle?: React.CSSProperties;
497borderRadius?: number;
498iconFillColor?: string;
499round?: boolean;
500size?: number | string;
501}>;
502
503export declare const WorkplaceShareButton: ForwardRefExoticComponent<Omit<Props< {
504quote?: string;
505hashtag?: string;
506}>, "forwardedRef" | "networkLink" | "opts" | "networkName"> & {
507quote?: string;
508hashtag?: string;
509} & RefAttributes<HTMLButtonElement>>;
510
511export declare const XIcon: FC<Omit<SVGProps<SVGSVGElement>, "width" | "height"> & {
512bgStyle?: React.CSSProperties;
513borderRadius?: number;
514iconFillColor?: string;
515round?: boolean;
516size?: number | string;
517}>;
518
519export { }
520
521declare global {
522 interface Window {
523 OK: {
524 Share: {
525 count: (index: number, _count: number) => void;
526 };
527 callbacks: ((count?: number) => void)[];
528 };
529 ODKL: {
530 updateCount: (index: string, count: string) => void;
531 };
532 }
533}
534
535declare global {
536 interface Window {
537 VK: {
538 Share?: {
539 count: (index: number, count: number) => void;
540 };
541 callbacks?: ((count?: number) => void)[];
542 };
543 }
544}
545
\No newline at end of file