tf-checkout-react 1.0.103 → 1.0.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/api/index.d.ts +3 -1
  2. package/dist/components/common/CustomField.d.ts +1 -1
  3. package/dist/components/common/DatePickerField.d.ts +14 -0
  4. package/dist/components/common/RedirectModal.d.ts +7 -0
  5. package/dist/components/countdown/index.d.ts +3 -1
  6. package/dist/components/orderDetailsContainer/ticketsTable.d.ts +2 -0
  7. package/dist/components/rsvpContainer/index.d.ts +7 -0
  8. package/dist/components/ticketResale/index.d.ts +5 -3
  9. package/dist/components/ticketsContainer/AccessCodeSection.d.ts +7 -0
  10. package/dist/components/ticketsContainer/PromoCodeSection.d.ts +5 -9
  11. package/dist/components/ticketsContainer/TicketsSection.d.ts +6 -3
  12. package/dist/components/ticketsContainer/index.d.ts +9 -2
  13. package/dist/components/timerWidget/index.d.ts +3 -3
  14. package/dist/images/cross.svg +44 -0
  15. package/dist/images/done.svg +3 -3
  16. package/dist/index.d.ts +2 -0
  17. package/dist/tf-checkout-react.cjs.development.js +639 -223
  18. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  19. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  20. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  21. package/dist/tf-checkout-react.esm.js +645 -231
  22. package/dist/tf-checkout-react.esm.js.map +1 -1
  23. package/dist/tf-checkout-styles.css +1 -1
  24. package/package.json +89 -89
  25. package/src/.DS_Store +0 -0
  26. package/src/.d.ts +2 -2
  27. package/src/api/index.ts +300 -278
  28. package/src/assets/images/cross.svg +44 -0
  29. package/src/assets/images/done.svg +3 -3
  30. package/src/components/.DS_Store +0 -0
  31. package/src/components/billing-info-container/index.tsx +811 -799
  32. package/src/components/billing-info-container/style.css +105 -105
  33. package/src/components/billing-info-container/utils.ts +225 -224
  34. package/src/components/common/CheckboxField.tsx +41 -41
  35. package/src/components/common/CustomField.tsx +87 -84
  36. package/src/components/common/DatePickerField.tsx +98 -0
  37. package/src/components/common/FormikPhoneNumberField.tsx +51 -51
  38. package/src/components/common/Loader.tsx +9 -9
  39. package/src/components/common/RadioField.tsx +35 -35
  40. package/src/components/common/RedirectModal.tsx +43 -0
  41. package/src/components/common/SelectField.tsx +80 -80
  42. package/src/components/common/SnackbarAlert.tsx +53 -53
  43. package/src/components/common/index.tsx +4 -4
  44. package/src/components/confirmModal/index.tsx +51 -51
  45. package/src/components/confirmModal/style.css +21 -21
  46. package/src/components/confirmationContainer/config.ts +72 -72
  47. package/src/components/confirmationContainer/index.tsx +197 -197
  48. package/src/components/confirmationContainer/social-buttons.tsx +94 -94
  49. package/src/components/confirmationContainer/style.css +202 -202
  50. package/src/components/countdown/index.tsx +98 -89
  51. package/src/components/countdown/style.css +9 -9
  52. package/src/components/index.ts +7 -7
  53. package/src/components/loginModal/index.tsx +209 -209
  54. package/src/components/loginModal/style.css +71 -71
  55. package/src/components/myTicketsContainer/index.tsx +196 -196
  56. package/src/components/myTicketsContainer/row.tsx +41 -41
  57. package/src/components/myTicketsContainer/style.css +39 -39
  58. package/src/components/myTicketsContainer/tableConfig.tsx +34 -34
  59. package/src/components/orderDetailsContainer/index.tsx +252 -249
  60. package/src/components/orderDetailsContainer/style.css +72 -72
  61. package/src/components/orderDetailsContainer/ticketsTable.tsx +130 -124
  62. package/src/components/paymentContainer/index.tsx +285 -284
  63. package/src/components/registerModal/index.tsx +190 -190
  64. package/src/components/rsvpContainer/index.tsx +126 -0
  65. package/src/components/stripePayment/index.tsx +254 -253
  66. package/src/components/stripePayment/style.css +59 -59
  67. package/src/components/ticketResale/index.tsx +74 -56
  68. package/src/components/ticketResaleModal/index.tsx +215 -210
  69. package/src/components/ticketResaleModal/style.css +28 -28
  70. package/src/components/ticketsContainer/AccessCodeSection.tsx +50 -0
  71. package/src/components/ticketsContainer/PromoCodeSection.tsx +88 -99
  72. package/src/components/ticketsContainer/ReferralLogic.tsx +31 -33
  73. package/src/components/ticketsContainer/TicketRow.tsx +83 -83
  74. package/src/components/ticketsContainer/TicketsSection.tsx +90 -81
  75. package/src/components/ticketsContainer/index.tsx +464 -430
  76. package/src/components/ticketsContainer/style.css +181 -181
  77. package/src/components/ticketsContainer/utils.ts +11 -11
  78. package/src/components/timerWidget/index.tsx +87 -70
  79. package/src/components/timerWidget/style.css +34 -26
  80. package/src/components/waitingList/index.tsx +178 -178
  81. package/src/components/waitingList/style.css +26 -26
  82. package/src/env.ts +20 -20
  83. package/src/index.ts +15 -13
  84. package/src/normalizers/index.ts +45 -45
  85. package/src/types/billing-info-data.ts +37 -37
  86. package/src/types/payment-field.ts +7 -7
  87. package/src/types/referral-promotion.ts +7 -7
  88. package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +59 -59
  89. package/src/utils/downloadPDF.tsx +30 -30
  90. package/src/utils/formikErrorFocus.ts +24 -24
  91. package/src/utils/getImage.ts +14 -14
  92. package/src/utils/getQueryVariable.ts +13 -13
  93. package/src/utils/index.ts +5 -5
  94. package/src/utils/setConfigs.ts +26 -26
  95. package/src/utils/showZero.tsx +10 -10
  96. package/src/validators/index.ts +20 -20
@@ -1,80 +1,80 @@
1
- import React from 'react'
2
- import Select from '@mui/material/Select'
3
- import _map from 'lodash/map'
4
- import _get from 'lodash/get'
5
-
6
- import { FieldInputProps, FormikProps } from 'formik'
7
- import { FormControl, InputLabel, FormHelperText } from '@mui/material'
8
- import { useTheme } from '@mui/styles'
9
-
10
- export interface ISelectOption {
11
- label: string | number;
12
- value?: string | number;
13
- [key: string]: any;
14
- }
15
-
16
- export interface ISelectField {
17
- label: string;
18
-
19
- field: FieldInputProps<any>;
20
- form: FormikProps<any>;
21
- theme: 'dark' | 'light';
22
-
23
- // optional
24
- type?: string;
25
- selectOptions?: ISelectOption[];
26
- }
27
-
28
- interface IOtherProps {
29
- [key: string]: any;
30
- }
31
-
32
- export const SelectField = ({
33
- label,
34
- type = 'text',
35
- field,
36
- selectOptions = [] as ISelectOption[],
37
- form: { touched, errors },
38
- theme,
39
- }: ISelectField & IOtherProps) => {
40
- const isTouched = Boolean(_get(touched, field.name))
41
- const error = _get(errors, field.name)
42
-
43
- const customTheme: any = useTheme()
44
-
45
- return (
46
- <FormControl fullWidth={true}>
47
- <InputLabel style={customTheme?.input} htmlFor={field.name} error={!!error && isTouched} shrink={true}>
48
- {label}
49
- </InputLabel>
50
- <Select
51
- id={field.name}
52
- label={label}
53
- type={type}
54
- fullWidth={true}
55
- error={!!error && isTouched}
56
- inputProps={{
57
- id: field.name,
58
- }}
59
- native={true}
60
- className={theme}
61
- MenuProps={{ className: theme }}
62
- {...field}
63
- style={customTheme?.input}
64
- >
65
- {_map(selectOptions, option => (
66
- <option
67
- key={option.value}
68
- value={option.value}
69
- disabled={option.disabled}
70
- >
71
- {option.label}
72
- </option>
73
- ))}
74
- </Select>
75
- {isTouched && error ? (
76
- <FormHelperText error={!!error && isTouched}>{error}</FormHelperText>
77
- ) : null}
78
- </FormControl>
79
- )
80
- }
1
+ import React from 'react'
2
+ import Select from '@mui/material/Select'
3
+ import _map from 'lodash/map'
4
+ import _get from 'lodash/get'
5
+
6
+ import { FieldInputProps, FormikProps } from 'formik'
7
+ import { FormControl, InputLabel, FormHelperText } from '@mui/material'
8
+ import { useTheme } from '@mui/styles'
9
+
10
+ export interface ISelectOption {
11
+ label: string | number;
12
+ value?: string | number;
13
+ [key: string]: any;
14
+ }
15
+
16
+ export interface ISelectField {
17
+ label: string;
18
+
19
+ field: FieldInputProps<any>;
20
+ form: FormikProps<any>;
21
+ theme: 'dark' | 'light';
22
+
23
+ // optional
24
+ type?: string;
25
+ selectOptions?: ISelectOption[];
26
+ }
27
+
28
+ interface IOtherProps {
29
+ [key: string]: any;
30
+ }
31
+
32
+ export const SelectField = ({
33
+ label,
34
+ type = 'text',
35
+ field,
36
+ selectOptions = [] as ISelectOption[],
37
+ form: { touched, errors },
38
+ theme,
39
+ }: ISelectField & IOtherProps) => {
40
+ const isTouched = Boolean(_get(touched, field.name))
41
+ const error = _get(errors, field.name)
42
+
43
+ const customTheme: any = useTheme()
44
+
45
+ return (
46
+ <FormControl fullWidth={true}>
47
+ <InputLabel style={customTheme?.input} htmlFor={field.name} error={!!error && isTouched} shrink={true}>
48
+ {label}
49
+ </InputLabel>
50
+ <Select
51
+ id={field.name}
52
+ label={label}
53
+ type={type}
54
+ fullWidth={true}
55
+ error={!!error && isTouched}
56
+ inputProps={{
57
+ id: field.name,
58
+ }}
59
+ native={true}
60
+ className={theme}
61
+ MenuProps={{ className: theme }}
62
+ {...field}
63
+ style={customTheme?.input}
64
+ >
65
+ {_map(selectOptions, option => (
66
+ <option
67
+ key={option.value}
68
+ value={option.value}
69
+ disabled={option.disabled}
70
+ >
71
+ {option.label}
72
+ </option>
73
+ ))}
74
+ </Select>
75
+ {isTouched && error ? (
76
+ <FormHelperText error={!!error && isTouched}>{error}</FormHelperText>
77
+ ) : null}
78
+ </FormControl>
79
+ )
80
+ }
@@ -1,54 +1,54 @@
1
- import React from 'react'
2
- import { Alert, AlertColor, Snackbar, SnackbarOrigin } from '@mui/material'
3
-
4
- interface ISnackbarAlertProps {
5
- isOpen: boolean
6
- message: string
7
- type: AlertColor
8
- position?: SnackbarOrigin
9
- autoHideDuration?: number
10
- variant?: 'filled' | 'standard' | 'outlined'
11
-
12
- onClose: () => void
13
- }
14
-
15
- const SnackbarAlert = ({
16
- isOpen,
17
- message,
18
- type,
19
- position,
20
- autoHideDuration = 3000,
21
- variant,
22
- onClose,
23
- }: ISnackbarAlertProps) => {
24
- return (
25
- <div className="snackbar-alert-container">
26
- <Snackbar
27
- autoHideDuration={autoHideDuration}
28
- open={isOpen}
29
- anchorOrigin={position || { vertical: 'top', horizontal: 'center' }}
30
- onClose={onClose}
31
- classes={{
32
- root: 'snackbar-alert-snackbar-root',
33
- }}
34
- >
35
- <Alert
36
- severity={type}
37
- onClose={onClose}
38
- variant={variant || 'filled'}
39
- classes={{
40
- icon: 'snackbar-alert-icon',
41
- root: 'snackbar-alert-alert-root',
42
- action: 'snackbar-alert-action',
43
- message: 'snackbar-alert-message',
44
- filled: 'snackbar-alert-filled',
45
- }}
46
- >
47
- {message}
48
- </Alert>
49
- </Snackbar>
50
- </div>
51
- )
52
- }
53
-
1
+ import React from 'react'
2
+ import { Alert, AlertColor, Snackbar, SnackbarOrigin } from '@mui/material'
3
+
4
+ interface ISnackbarAlertProps {
5
+ isOpen: boolean
6
+ message: string
7
+ type: AlertColor
8
+ position?: SnackbarOrigin
9
+ autoHideDuration?: number
10
+ variant?: 'filled' | 'standard' | 'outlined'
11
+
12
+ onClose: () => void
13
+ }
14
+
15
+ const SnackbarAlert = ({
16
+ isOpen,
17
+ message,
18
+ type,
19
+ position,
20
+ autoHideDuration = 3000,
21
+ variant,
22
+ onClose,
23
+ }: ISnackbarAlertProps) => {
24
+ return (
25
+ <div className="snackbar-alert-container">
26
+ <Snackbar
27
+ autoHideDuration={autoHideDuration}
28
+ open={isOpen}
29
+ anchorOrigin={position || { vertical: 'top', horizontal: 'center' }}
30
+ onClose={onClose}
31
+ classes={{
32
+ root: 'snackbar-alert-snackbar-root',
33
+ }}
34
+ >
35
+ <Alert
36
+ severity={type}
37
+ onClose={onClose}
38
+ variant={variant || 'filled'}
39
+ classes={{
40
+ icon: 'snackbar-alert-icon',
41
+ root: 'snackbar-alert-alert-root',
42
+ action: 'snackbar-alert-action',
43
+ message: 'snackbar-alert-message',
44
+ filled: 'snackbar-alert-filled',
45
+ }}
46
+ >
47
+ {message}
48
+ </Alert>
49
+ </Snackbar>
50
+ </div>
51
+ )
52
+ }
53
+
54
54
  export default SnackbarAlert
@@ -1,5 +1,5 @@
1
- export { CheckboxField } from './CheckboxField'
2
- export { CustomField } from './CustomField'
3
- export { FormikPhoneNumberField } from './FormikPhoneNumberField'
4
- export { Loader } from './Loader'
1
+ export { CheckboxField } from './CheckboxField'
2
+ export { CustomField } from './CustomField'
3
+ export { FormikPhoneNumberField } from './FormikPhoneNumberField'
4
+ export { Loader } from './Loader'
5
5
  export { SelectField } from './SelectField'
@@ -1,51 +1,51 @@
1
- import React, { FC } from 'react'
2
- import Modal from '@mui/material/Modal'
3
- import Box from '@mui/material/Box'
4
- import Button from '@mui/material/Button';
5
- import './style.css'
6
-
7
- interface Props {
8
- message: string;
9
- onClose: () => void;
10
- onConfirm: () => void;
11
- }
12
-
13
- const style: React.CSSProperties = {
14
- position: 'absolute',
15
- top: '50%',
16
- left: '50%',
17
- transform: 'translate(-50%, -50%)',
18
- minWidth: 480,
19
- backgroundColor: '#e3e3e3',
20
- border: '1px solid white',
21
- outline: 'none',
22
- padding: '14px',
23
- maxHeight: '85vh',
24
- overflow: 'auto'
25
- }
26
-
27
- const ConfirmModal: FC<Props> = ({
28
- message = '',
29
- onClose = () => {},
30
- onConfirm = () => {},
31
- }) => {
32
- return (
33
- <Modal
34
- open={true}
35
- onClose={onClose}
36
- aria-labelledby="modal-modal-title"
37
- aria-describedby="modal-modal-description"
38
- className='confirm-modal'
39
- >
40
- <Box style={style}>
41
- <p>{message}</p>
42
- <div className='footer'>
43
- <Button onClick={onClose}>Cancel</Button>
44
- <Button onClick={onConfirm}>OK</Button>
45
- </div>
46
- </Box>
47
- </Modal>
48
- )
49
- }
50
-
51
- export default ConfirmModal
1
+ import React, { FC } from 'react'
2
+ import Modal from '@mui/material/Modal'
3
+ import Box from '@mui/material/Box'
4
+ import Button from '@mui/material/Button';
5
+ import './style.css'
6
+
7
+ interface Props {
8
+ message: string;
9
+ onClose: () => void;
10
+ onConfirm: () => void;
11
+ }
12
+
13
+ const style: React.CSSProperties = {
14
+ position: 'absolute',
15
+ top: '50%',
16
+ left: '50%',
17
+ transform: 'translate(-50%, -50%)',
18
+ minWidth: 480,
19
+ backgroundColor: '#e3e3e3',
20
+ border: '1px solid white',
21
+ outline: 'none',
22
+ padding: '14px',
23
+ maxHeight: '85vh',
24
+ overflow: 'auto'
25
+ }
26
+
27
+ const ConfirmModal: FC<Props> = ({
28
+ message = '',
29
+ onClose = () => {},
30
+ onConfirm = () => {},
31
+ }) => {
32
+ return (
33
+ <Modal
34
+ open={true}
35
+ onClose={onClose}
36
+ aria-labelledby="modal-modal-title"
37
+ aria-describedby="modal-modal-description"
38
+ className='confirm-modal'
39
+ >
40
+ <Box style={style}>
41
+ <p>{message}</p>
42
+ <div className='footer'>
43
+ <Button onClick={onClose}>Cancel</Button>
44
+ <Button onClick={onConfirm}>OK</Button>
45
+ </div>
46
+ </Box>
47
+ </Modal>
48
+ )
49
+ }
50
+
51
+ export default ConfirmModal
@@ -1,21 +1,21 @@
1
- .confirm-modal .footer {
2
- display: flex;
3
- gap: 10px;
4
- justify-content: flex-end;
5
- border-top: 1px solid rgb(192, 191, 191);
6
- }
7
- .confirm-modal .footer button {
8
- width: max-content;
9
- padding: 12px 8px;
10
- font-size: 12px;
11
- min-height: unset;
12
- text-transform: unset;
13
- }
14
- .confirm-modal .footer button:hover {
15
- width: max-content;
16
- padding: 12px 8px;
17
- font-size: 12px;
18
- background: #505050;
19
- min-height: unset;
20
- text-transform: unset;
21
- }
1
+ .confirm-modal .footer {
2
+ display: flex;
3
+ gap: 10px;
4
+ justify-content: flex-end;
5
+ border-top: 1px solid rgb(192, 191, 191);
6
+ }
7
+ .confirm-modal .footer button {
8
+ width: max-content;
9
+ padding: 12px 8px;
10
+ font-size: 12px;
11
+ min-height: unset;
12
+ text-transform: unset;
13
+ }
14
+ .confirm-modal .footer button:hover {
15
+ width: max-content;
16
+ padding: 12px 8px;
17
+ font-size: 12px;
18
+ background: #505050;
19
+ min-height: unset;
20
+ text-transform: unset;
21
+ }
@@ -1,72 +1,72 @@
1
- import {
2
- FacebookShareButton,
3
- FacebookMessengerShareButton,
4
- TwitterShareButton,
5
- LinkedinShareButton,
6
- PinterestShareButton,
7
- VKShareButton,
8
- OKShareButton,
9
- TelegramShareButton,
10
- WhatsappShareButton,
11
- RedditShareButton,
12
- TumblrShareButton,
13
- MailruShareButton,
14
- EmailShareButton,
15
- LivejournalShareButton,
16
- ViberShareButton,
17
- WorkplaceShareButton,
18
- LineShareButton,
19
- PocketShareButton,
20
- InstapaperShareButton,
21
- WeiboShareButton,
22
- HatenaShareButton,
23
- FacebookIcon,
24
- FacebookMessengerIcon,
25
- TwitterIcon,
26
- LinkedinIcon,
27
- PinterestIcon,
28
- VKIcon,
29
- OKIcon,
30
- TelegramIcon,
31
- WhatsappIcon,
32
- RedditIcon,
33
- TumblrIcon,
34
- MailruIcon,
35
- EmailIcon,
36
- LivejournalIcon,
37
- ViberIcon,
38
- WorkplaceIcon,
39
- LineIcon,
40
- PocketIcon,
41
- InstapaperIcon,
42
- WeiboIcon,
43
- HatenaIcon,
44
- } from 'react-share'
45
-
46
- const config: any = {
47
- facebook: { component: FacebookShareButton, icon: FacebookIcon },
48
- messenger: { component: FacebookMessengerShareButton, icon: FacebookMessengerIcon },
49
- twitter: { component: TwitterShareButton, icon: TwitterIcon },
50
- linkedin: { component: LinkedinShareButton, icon: LinkedinIcon },
51
- pinterest: { component: PinterestShareButton, icon: PinterestIcon },
52
- vk: { component: VKShareButton, icon: VKIcon },
53
- ok: { component: OKShareButton, icon: OKIcon },
54
- telegram: { component: TelegramShareButton, icon: TelegramIcon },
55
- whatsapp: { component: WhatsappShareButton, icon: WhatsappIcon },
56
- reddit: { component: RedditShareButton, icon: RedditIcon },
57
- tumblr: { component: TumblrShareButton, icon: TumblrIcon },
58
- mailru: { component: MailruShareButton, icon: MailruIcon },
59
- email: { component: EmailShareButton, icon: EmailIcon },
60
- livejournal: { component: LivejournalShareButton, icon: LivejournalIcon },
61
- viber: { component: ViberShareButton, icon: ViberIcon },
62
- workplace: { component: WorkplaceShareButton, icon: WorkplaceIcon },
63
- line: { component: LineShareButton, icon: LineIcon },
64
- pocket: { component: PocketShareButton, icon: PocketIcon },
65
- instapaper: { component: InstapaperShareButton, icon: InstapaperIcon },
66
- weibo: { component: WeiboShareButton, icon: WeiboIcon },
67
- hatena: { component: HatenaShareButton, icon: HatenaIcon },
68
- }
69
-
70
- export default function (key: string) {
71
- return config[key]
72
- }
1
+ import {
2
+ FacebookShareButton,
3
+ FacebookMessengerShareButton,
4
+ TwitterShareButton,
5
+ LinkedinShareButton,
6
+ PinterestShareButton,
7
+ VKShareButton,
8
+ OKShareButton,
9
+ TelegramShareButton,
10
+ WhatsappShareButton,
11
+ RedditShareButton,
12
+ TumblrShareButton,
13
+ MailruShareButton,
14
+ EmailShareButton,
15
+ LivejournalShareButton,
16
+ ViberShareButton,
17
+ WorkplaceShareButton,
18
+ LineShareButton,
19
+ PocketShareButton,
20
+ InstapaperShareButton,
21
+ WeiboShareButton,
22
+ HatenaShareButton,
23
+ FacebookIcon,
24
+ FacebookMessengerIcon,
25
+ TwitterIcon,
26
+ LinkedinIcon,
27
+ PinterestIcon,
28
+ VKIcon,
29
+ OKIcon,
30
+ TelegramIcon,
31
+ WhatsappIcon,
32
+ RedditIcon,
33
+ TumblrIcon,
34
+ MailruIcon,
35
+ EmailIcon,
36
+ LivejournalIcon,
37
+ ViberIcon,
38
+ WorkplaceIcon,
39
+ LineIcon,
40
+ PocketIcon,
41
+ InstapaperIcon,
42
+ WeiboIcon,
43
+ HatenaIcon,
44
+ } from 'react-share'
45
+
46
+ const config: any = {
47
+ facebook: { component: FacebookShareButton, icon: FacebookIcon },
48
+ messenger: { component: FacebookMessengerShareButton, icon: FacebookMessengerIcon },
49
+ twitter: { component: TwitterShareButton, icon: TwitterIcon },
50
+ linkedin: { component: LinkedinShareButton, icon: LinkedinIcon },
51
+ pinterest: { component: PinterestShareButton, icon: PinterestIcon },
52
+ vk: { component: VKShareButton, icon: VKIcon },
53
+ ok: { component: OKShareButton, icon: OKIcon },
54
+ telegram: { component: TelegramShareButton, icon: TelegramIcon },
55
+ whatsapp: { component: WhatsappShareButton, icon: WhatsappIcon },
56
+ reddit: { component: RedditShareButton, icon: RedditIcon },
57
+ tumblr: { component: TumblrShareButton, icon: TumblrIcon },
58
+ mailru: { component: MailruShareButton, icon: MailruIcon },
59
+ email: { component: EmailShareButton, icon: EmailIcon },
60
+ livejournal: { component: LivejournalShareButton, icon: LivejournalIcon },
61
+ viber: { component: ViberShareButton, icon: ViberIcon },
62
+ workplace: { component: WorkplaceShareButton, icon: WorkplaceIcon },
63
+ line: { component: LineShareButton, icon: LineIcon },
64
+ pocket: { component: PocketShareButton, icon: PocketIcon },
65
+ instapaper: { component: InstapaperShareButton, icon: InstapaperIcon },
66
+ weibo: { component: WeiboShareButton, icon: WeiboIcon },
67
+ hatena: { component: HatenaShareButton, icon: HatenaIcon },
68
+ }
69
+
70
+ export default function (key: string) {
71
+ return config[key]
72
+ }