@dynamic-labs/sdk-react-core 4.10.4 → 4.11.0
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.
- package/CHANGELOG.md +12 -0
- package/package.cjs +1 -1
- package/package.js +1 -1
- package/package.json +11 -11
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +16 -4
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +16 -4
- package/src/lib/components/index.d.ts +0 -1
- package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.cjs +1 -1
- package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.js +1 -1
- package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.cjs +1 -1
- package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.js +1 -1
- package/src/lib/context/DynamicContext/DynamicContext.cjs +2 -5
- package/src/lib/context/DynamicContext/DynamicContext.js +2 -5
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.cjs +1 -1
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.js +1 -1
- package/src/lib/context/DynamicContext/hooks/useRemoveWallet/useRemoveWallet.cjs +15 -14
- package/src/lib/context/DynamicContext/hooks/useRemoveWallet/useRemoveWallet.js +15 -14
- package/src/lib/context/DynamicContext/types/DynamicContextProps.d.ts +0 -1
- package/src/lib/context/DynamicContext/types/IDynamicContext.d.ts +1 -2
- package/src/lib/data/api/api.cjs +7 -2
- package/src/lib/data/api/api.d.ts +1 -1
- package/src/lib/data/api/api.js +7 -2
- package/src/lib/data/api/wallets/wallets.cjs +7 -7
- package/src/lib/data/api/wallets/wallets.js +7 -7
- package/src/lib/shared/consts/index.cjs +0 -2
- package/src/lib/shared/consts/index.d.ts +0 -1
- package/src/lib/shared/consts/index.js +1 -2
- package/src/lib/store/internalImplementation/store.cjs +1 -1
- package/src/lib/store/internalImplementation/store.js +2 -2
- package/src/lib/store/state/nonce/nonce.cjs +1 -1
- package/src/lib/store/state/nonce/nonce.js +1 -1
- package/src/lib/store/stateConfig.cjs +2 -2
- package/src/lib/store/stateConfig.d.ts +1 -1
- package/src/lib/store/stateConfig.js +2 -2
- package/src/lib/store/utils/settingsUtils/settingsUtils.d.ts +1 -1
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/updatePrimaryWalletId/updatePrimaryWalletId.cjs +1 -1
- package/src/lib/utils/functions/updatePrimaryWalletId/updatePrimaryWalletId.js +1 -1
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +1 -1
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +1 -1
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +1 -1
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +1 -1
- package/src/lib/utils/hooks/useDeleteUserAccount/useDeleteUserAccount.cjs +1 -1
- package/src/lib/utils/hooks/useDeleteUserAccount/useDeleteUserAccount.js +1 -1
- package/src/lib/utils/hooks/useEmbeddedWalletSessionKeys/useEmbeddedWalletSessionKeys.cjs +1 -1
- package/src/lib/utils/hooks/useEmbeddedWalletSessionKeys/useEmbeddedWalletSessionKeys.js +1 -1
- package/src/lib/utils/hooks/useExternalAuth/useExternalAuth.cjs +1 -1
- package/src/lib/utils/hooks/useExternalAuth/useExternalAuth.js +1 -1
- package/src/lib/utils/hooks/useMergeUserAccounts/useMergeUserAccounts.cjs +1 -1
- package/src/lib/utils/hooks/useMergeUserAccounts/useMergeUserAccounts.js +1 -1
- package/src/lib/utils/hooks/useMfa/useMfa.cjs +1 -1
- package/src/lib/utils/hooks/useMfa/useMfa.js +1 -1
- package/src/lib/utils/hooks/useNetworkNotSupported/useNetworkNotSupported.cjs +1 -1
- package/src/lib/utils/hooks/useNetworkNotSupported/useNetworkNotSupported.js +1 -1
- package/src/lib/utils/hooks/useRefreshUser/useRefreshUser.cjs +1 -1
- package/src/lib/utils/hooks/useRefreshUser/useRefreshUser.js +1 -1
- package/src/lib/utils/hooks/useSendDynamicProps/useSendDynamicProps.cjs +1 -1
- package/src/lib/utils/hooks/useSendDynamicProps/useSendDynamicProps.js +1 -1
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +1 -1
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +1 -1
- package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.cjs +1 -1
- package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.js +1 -1
- package/src/lib/views/LoginView/useLoginView/useLoginView.cjs +0 -1
- package/src/lib/views/LoginView/useLoginView/useLoginView.js +0 -1
- package/src/lib/views/Passkey/utils/createEmbeddedWalletRequest/createEmbeddedWalletRequest.cjs +1 -1
- package/src/lib/views/Passkey/utils/createEmbeddedWalletRequest/createEmbeddedWalletRequest.js +1 -1
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.cjs +1 -1
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.js +1 -1
- package/src/lib/components/Switch/Switch.cjs +0 -11
- package/src/lib/components/Switch/Switch.js +0 -7
- package/src/lib/components/Toolkit/Toolkit.cjs +0 -118
- package/src/lib/components/Toolkit/Toolkit.d.ts +0 -2
- package/src/lib/components/Toolkit/Toolkit.js +0 -114
- package/src/lib/components/Toolkit/components/AuthModeSwitch.cjs +0 -12
- package/src/lib/components/Toolkit/components/AuthModeSwitch.d.ts +0 -7
- package/src/lib/components/Toolkit/components/AuthModeSwitch.js +0 -8
- package/src/lib/components/Toolkit/components/LoginWithEmailSwitch.cjs +0 -112
- package/src/lib/components/Toolkit/components/LoginWithEmailSwitch.d.ts +0 -1
- package/src/lib/components/Toolkit/components/LoginWithEmailSwitch.js +0 -108
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.cjs +0 -112
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.d.ts +0 -1
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.js +0 -108
- package/src/lib/components/Toolkit/components/PrimaryColorInput.cjs +0 -21
- package/src/lib/components/Toolkit/components/PrimaryColorInput.d.ts +0 -2
- package/src/lib/components/Toolkit/components/PrimaryColorInput.js +0 -17
- package/src/lib/components/Toolkit/components/TemplateSelect.cjs +0 -18
- package/src/lib/components/Toolkit/components/TemplateSelect.d.ts +0 -1
- package/src/lib/components/Toolkit/components/TemplateSelect.js +0 -14
- package/src/lib/components/Toolkit/components/ThemeSwitch.cjs +0 -27
- package/src/lib/components/Toolkit/components/ThemeSwitch.d.ts +0 -1
- package/src/lib/components/Toolkit/components/ThemeSwitch.js +0 -23
- package/src/lib/components/Toolkit/components/index.d.ts +0 -6
- package/src/lib/components/Toolkit/index.d.ts +0 -1
package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import 'react';
|
|
4
|
-
import '../../../context/DynamicContext/DynamicContext.js';
|
|
5
|
-
import '@dynamic-labs/sdk-api-core';
|
|
6
|
-
import '../../../shared/logger.js';
|
|
7
|
-
import '@dynamic-labs/iconic';
|
|
8
|
-
import '@dynamic-labs/wallet-connector-core';
|
|
9
|
-
import '../../../context/ViewContext/ViewContext.js';
|
|
10
|
-
import '@dynamic-labs/wallet-book';
|
|
11
|
-
import '@dynamic-labs/utils';
|
|
12
|
-
import '../../../utils/constants/colors.js';
|
|
13
|
-
import '../../../utils/constants/values.js';
|
|
14
|
-
import '../../../shared/consts/index.js';
|
|
15
|
-
import '../../../events/dynamicEvents.js';
|
|
16
|
-
import '../../../../../_virtual/_tslib.js';
|
|
17
|
-
import '../../../context/CaptchaContext/CaptchaContext.js';
|
|
18
|
-
import '../../../context/ErrorContext/ErrorContext.js';
|
|
19
|
-
import '@dynamic-labs/multi-wallet';
|
|
20
|
-
import 'react-international-phone';
|
|
21
|
-
import '../../../store/state/nonce/nonce.js';
|
|
22
|
-
import '../../../store/state/projectSettings/projectSettings.js';
|
|
23
|
-
import '../../../config/ApiEndpoint.js';
|
|
24
|
-
import '../../../store/state/user/user.js';
|
|
25
|
-
import '../../../locale/locale.js';
|
|
26
|
-
import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
27
|
-
import '../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
28
|
-
import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
29
|
-
import '../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
30
|
-
import '../../../context/UserWalletsContext/UserWalletsContext.js';
|
|
31
|
-
import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
32
|
-
import '../../../context/VerificationContext/VerificationContext.js';
|
|
33
|
-
import 'react-dom';
|
|
34
|
-
import '../../../utils/functions/compareChains/compareChains.js';
|
|
35
|
-
import '../../../context/ThemeContext/ThemeContext.js';
|
|
36
|
-
import '../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
|
|
37
|
-
import 'bs58';
|
|
38
|
-
import '@dynamic-labs/types';
|
|
39
|
-
import '../../../context/SocialRedirectContext/SocialRedirectContext.js';
|
|
40
|
-
import '../../../context/LoadingContext/LoadingContext.js';
|
|
41
|
-
import '../../../context/WalletContext/WalletContext.js';
|
|
42
|
-
import '../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
|
|
43
|
-
import 'yup';
|
|
44
|
-
import '../../../context/MockContext/MockContext.js';
|
|
45
|
-
import '../../../views/CollectUserDataView/useFields.js';
|
|
46
|
-
import '../../../context/FieldsStateContext/FieldsStateContext.js';
|
|
47
|
-
import '../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
|
|
48
|
-
import '@dynamic-labs/rpc-providers';
|
|
49
|
-
import '../../../store/state/loadingAndLifecycle.js';
|
|
50
|
-
import '../../../store/state/walletOptions/walletOptions.js';
|
|
51
|
-
import 'react-i18next';
|
|
52
|
-
import '../../Accordion/components/AccordionItem/AccordionItem.js';
|
|
53
|
-
import '../../Alert/Alert.js';
|
|
54
|
-
import '../../ShadowDOM/ShadowDOM.js';
|
|
55
|
-
import '../../IconButton/IconButton.js';
|
|
56
|
-
import '../../InlineWidget/InlineWidget.js';
|
|
57
|
-
import '../../Input/Input.js';
|
|
58
|
-
import '../../IsBrowser/IsBrowser.js';
|
|
59
|
-
import '../../MenuList/Dropdown/Dropdown.js';
|
|
60
|
-
import '../../OverlayCard/OverlayCard.js';
|
|
61
|
-
import '../../Transition/ZoomTransition/ZoomTransition.js';
|
|
62
|
-
import '../../Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
63
|
-
import '../../Transition/OpacityTransition/OpacityTransition.js';
|
|
64
|
-
import '../../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
|
|
65
|
-
import '../../Popper/Popper/Popper.js';
|
|
66
|
-
import '../../Popper/PopperContext/PopperContext.js';
|
|
67
|
-
import 'react-focus-lock';
|
|
68
|
-
import 'qrcode';
|
|
69
|
-
import 'formik';
|
|
70
|
-
import '../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
|
|
71
|
-
import '../../../context/WalletGroupContext/WalletGroupContext.js';
|
|
72
|
-
import '../../../context/IpConfigurationContext/IpConfigurationContext.js';
|
|
73
|
-
import '../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
|
|
74
|
-
import '../../../context/ConnectWithOtpContext/constants.js';
|
|
75
|
-
import '../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
76
|
-
import '@hcaptcha/react-hcaptcha';
|
|
77
|
-
import '../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
|
|
78
|
-
import '../../../context/FooterAnimationContext/index.js';
|
|
79
|
-
import '../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
|
|
80
|
-
import '../../../context/PasskeyContext/PasskeyContext.js';
|
|
81
|
-
import '../../../store/state/sendBalances.js';
|
|
82
|
-
import { Switch } from '../../Switch/Switch.js';
|
|
83
|
-
import '../../../store/state/connectorsInitializing/connectorsInitializing.js';
|
|
84
|
-
import '../../OverlayCardBase/OverlayCardTarget/OverlayCardTarget.js';
|
|
85
|
-
import '../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
86
|
-
import '../../../views/TransactionConfirmationView/TransactionConfirmationView.js';
|
|
87
|
-
import '../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
|
|
88
|
-
import '../../../context/OnrampContext/OnrampContext.js';
|
|
89
|
-
import '../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFunds.js';
|
|
90
|
-
import '../../../../index.js';
|
|
91
|
-
import '../../../store/state/tokenBalances.js';
|
|
92
|
-
import '../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
|
|
93
|
-
import { useInternalDynamicContext } from '../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.js';
|
|
94
|
-
|
|
95
|
-
const LoginWithEmailViewDisplayPriorityOrderSwitch = () => {
|
|
96
|
-
const { authorizationViewDisplayOrder, setAuthorizationViewDisplayOrder, loginWithEmail, } = useInternalDynamicContext();
|
|
97
|
-
return (jsx(Switch, { disabled: !loginWithEmail, firstButton: {
|
|
98
|
-
active: authorizationViewDisplayOrder === 'web2',
|
|
99
|
-
handleButtonClick: () => setAuthorizationViewDisplayOrder('web2'),
|
|
100
|
-
name: 'Email',
|
|
101
|
-
}, secondButton: {
|
|
102
|
-
active: authorizationViewDisplayOrder === 'web3',
|
|
103
|
-
handleButtonClick: () => setAuthorizationViewDisplayOrder('web3'),
|
|
104
|
-
name: 'Wallet',
|
|
105
|
-
} }));
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export { LoginWithEmailViewDisplayPriorityOrderSwitch };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
var React = require('react');
|
|
8
|
-
var ThemeContext = require('../../../context/ThemeContext/ThemeContext.cjs');
|
|
9
|
-
var Input = require('../../Input/Input.cjs');
|
|
10
|
-
|
|
11
|
-
const PrimaryColorInput = () => {
|
|
12
|
-
const { changePrimaryColor, theme } = ThemeContext.useThemeContext();
|
|
13
|
-
const [color, setColor] = React.useState(theme.customColor);
|
|
14
|
-
return (jsxRuntime.jsx(Input.Input, { id: 'primary-color', label: 'Primary color', value: color, onChange: (e) => setColor(e.target.value), onBlur: (e) => {
|
|
15
|
-
const newColor = color || theme.customColor;
|
|
16
|
-
setColor(newColor);
|
|
17
|
-
changePrimaryColor(newColor);
|
|
18
|
-
} }));
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
exports.PrimaryColorInput = PrimaryColorInput;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { useThemeContext } from '../../../context/ThemeContext/ThemeContext.js';
|
|
5
|
-
import { Input } from '../../Input/Input.js';
|
|
6
|
-
|
|
7
|
-
const PrimaryColorInput = () => {
|
|
8
|
-
const { changePrimaryColor, theme } = useThemeContext();
|
|
9
|
-
const [color, setColor] = useState(theme.customColor);
|
|
10
|
-
return (jsx(Input, { id: 'primary-color', label: 'Primary color', value: color, onChange: (e) => setColor(e.target.value), onBlur: (e) => {
|
|
11
|
-
const newColor = color || theme.customColor;
|
|
12
|
-
setColor(newColor);
|
|
13
|
-
changePrimaryColor(newColor);
|
|
14
|
-
} }));
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export { PrimaryColorInput };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
var ThemeContext = require('../../../context/ThemeContext/ThemeContext.cjs');
|
|
8
|
-
var Select = require('../../Select/Select.cjs');
|
|
9
|
-
|
|
10
|
-
const TemplateSelect = () => {
|
|
11
|
-
const { theme, changeTemplate } = ThemeContext.useThemeContext();
|
|
12
|
-
const handleChange = (e) => {
|
|
13
|
-
changeTemplate(e.target.value);
|
|
14
|
-
};
|
|
15
|
-
return (jsxRuntime.jsxs(Select.Select, { label: 'template', value: theme.template, onChange: handleChange, selectDataTestId: 'template-select', children: [jsxRuntime.jsx("option", { value: 'default', children: "Default" }), jsxRuntime.jsx("option", { value: 'matrix', children: "Matrix" }), jsxRuntime.jsx("option", { value: 'minimal', children: "Minimal" }), jsxRuntime.jsx("option", { value: 'rounded', children: "Rounded" }), jsxRuntime.jsx("option", { value: 'trinity', children: "Trinity" })] }));
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
exports.TemplateSelect = TemplateSelect;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TemplateSelect: () => JSX.Element;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { useThemeContext } from '../../../context/ThemeContext/ThemeContext.js';
|
|
4
|
-
import { Select } from '../../Select/Select.js';
|
|
5
|
-
|
|
6
|
-
const TemplateSelect = () => {
|
|
7
|
-
const { theme, changeTemplate } = useThemeContext();
|
|
8
|
-
const handleChange = (e) => {
|
|
9
|
-
changeTemplate(e.target.value);
|
|
10
|
-
};
|
|
11
|
-
return (jsxs(Select, { label: 'template', value: theme.template, onChange: handleChange, selectDataTestId: 'template-select', children: [jsx("option", { value: 'default', children: "Default" }), jsx("option", { value: 'matrix', children: "Matrix" }), jsx("option", { value: 'minimal', children: "Minimal" }), jsx("option", { value: 'rounded', children: "Rounded" }), jsx("option", { value: 'trinity', children: "Trinity" })] }));
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export { TemplateSelect };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
var ThemeContext = require('../../../context/ThemeContext/ThemeContext.cjs');
|
|
8
|
-
var Switch = require('../../Switch/Switch.cjs');
|
|
9
|
-
|
|
10
|
-
const ThemeSwitch = () => {
|
|
11
|
-
const { changeTheme, theme } = ThemeContext.useThemeContext();
|
|
12
|
-
return (jsxRuntime.jsx(Switch.Switch, { firstButton: {
|
|
13
|
-
active: theme.theme.name === 'light',
|
|
14
|
-
handleButtonClick: () => changeTheme('light'),
|
|
15
|
-
name: 'Light',
|
|
16
|
-
}, secondButton: {
|
|
17
|
-
active: theme.theme.name === 'dark',
|
|
18
|
-
handleButtonClick: () => changeTheme('dark'),
|
|
19
|
-
name: 'Dark',
|
|
20
|
-
}, thirdButton: {
|
|
21
|
-
active: theme.theme.name === 'auto',
|
|
22
|
-
handleButtonClick: () => changeTheme('auto'),
|
|
23
|
-
name: 'Auto',
|
|
24
|
-
} }));
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
exports.ThemeSwitch = ThemeSwitch;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ThemeSwitch: () => JSX.Element;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { useThemeContext } from '../../../context/ThemeContext/ThemeContext.js';
|
|
4
|
-
import { Switch } from '../../Switch/Switch.js';
|
|
5
|
-
|
|
6
|
-
const ThemeSwitch = () => {
|
|
7
|
-
const { changeTheme, theme } = useThemeContext();
|
|
8
|
-
return (jsx(Switch, { firstButton: {
|
|
9
|
-
active: theme.theme.name === 'light',
|
|
10
|
-
handleButtonClick: () => changeTheme('light'),
|
|
11
|
-
name: 'Light',
|
|
12
|
-
}, secondButton: {
|
|
13
|
-
active: theme.theme.name === 'dark',
|
|
14
|
-
handleButtonClick: () => changeTheme('dark'),
|
|
15
|
-
name: 'Dark',
|
|
16
|
-
}, thirdButton: {
|
|
17
|
-
active: theme.theme.name === 'auto',
|
|
18
|
-
handleButtonClick: () => changeTheme('auto'),
|
|
19
|
-
name: 'Auto',
|
|
20
|
-
} }));
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export { ThemeSwitch };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { ThemeSwitch } from './ThemeSwitch';
|
|
2
|
-
export { PrimaryColorInput } from './PrimaryColorInput';
|
|
3
|
-
export { AuthModeSwitch } from './AuthModeSwitch';
|
|
4
|
-
export { LoginWithEmailSwitch } from './LoginWithEmailSwitch';
|
|
5
|
-
export { LoginWithEmailViewDisplayPriorityOrderSwitch } from './LoginWithEmailViewDisplayPriorityOrderSwitch';
|
|
6
|
-
export { TemplateSelect } from './TemplateSelect';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Toolkit } from './Toolkit';
|