@rango-dev/widget-embedded 0.12.1-next.9 → 0.13.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 +55 -0
- package/dist/Widget.d.ts.map +1 -1
- package/dist/components/AppRouter.d.ts +5 -2
- package/dist/components/AppRouter.d.ts.map +1 -1
- package/dist/components/AppRoutes.d.ts.map +1 -1
- package/dist/components/BlockchainList/BlockchainList.d.ts.map +1 -1
- package/dist/components/BlockchainList/BlockchainList.helpers.d.ts.map +1 -1
- package/dist/components/BlockchainList/BlockchainList.styles.d.ts +14 -4
- package/dist/components/BlockchainList/BlockchainList.styles.d.ts.map +1 -1
- package/dist/components/BlockchainsSection/BlockchainsSection.d.ts.map +1 -1
- package/dist/components/BlockchainsSection/BlockchainsSection.styles.d.ts +6 -1
- package/dist/components/BlockchainsSection/BlockchainsSection.styles.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.helpers.d.ts +1 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.helpers.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts +94 -17
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/WalletList.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/WalletList.styles.d.ts +18 -3
- package/dist/components/ConfirmWalletsModal/WalletList.styles.d.ts.map +1 -1
- package/dist/components/HeaderButtons/HeaderButtons.styles.d.ts +25 -284
- package/dist/components/HeaderButtons/HeaderButtons.styles.d.ts.map +1 -1
- package/dist/components/HeaderButtons/HeaderButtons.types.d.ts +1 -0
- package/dist/components/HeaderButtons/HeaderButtons.types.d.ts.map +1 -1
- package/dist/components/HeaderButtons/HomeButtons.d.ts.map +1 -1
- package/dist/components/HeaderButtons/UnreadNotificationsBadge.d.ts.map +1 -1
- package/dist/components/HeaderButtons/WalletButton.d.ts.map +1 -1
- package/dist/components/Layout/Layout.d.ts.map +1 -1
- package/dist/components/Layout/Layout.styles.d.ts +18 -3
- package/dist/components/Layout/Layout.styles.d.ts.map +1 -1
- package/dist/components/LoadingLiquiditySourceList/LoadingLiquiditySourceList.styles.d.ts +6 -1
- package/dist/components/LoadingLiquiditySourceList/LoadingLiquiditySourceList.styles.d.ts.map +1 -1
- package/dist/components/LoadingSwapDetails/LoadingSwapDetailStep.d.ts +4 -0
- package/dist/components/LoadingSwapDetails/LoadingSwapDetailStep.d.ts.map +1 -0
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.d.ts +3 -0
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.d.ts.map +1 -0
- package/dist/components/{SelectableCategoryList/SelectableCategoryList.styles.d.ts → LoadingSwapDetails/LoadingSwapDetails.styles.d.ts} +21 -6
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts.map +1 -0
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.types.d.ts +4 -0
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.types.d.ts.map +1 -0
- package/dist/components/LoadingSwapDetails/index.d.ts +2 -0
- package/dist/components/LoadingSwapDetails/index.d.ts.map +1 -0
- package/dist/components/NoRoutes/NoRoutes.helper.d.ts.map +1 -1
- package/dist/components/NoRoutes/NoRoutes.styles.d.ts +18 -3
- package/dist/components/NoRoutes/NoRoutes.styles.d.ts.map +1 -1
- package/dist/components/NotificationContent/NotificationContent.d.ts.map +1 -1
- package/dist/components/NotificationContent/NotificationContent.styles.d.ts +24 -4
- package/dist/components/NotificationContent/NotificationContent.styles.d.ts.map +1 -1
- package/dist/components/RouteErrors/RouteErrors.d.ts.map +1 -1
- package/dist/components/RouteErrors/RouteErrors.styles.d.ts +24 -4
- package/dist/components/RouteErrors/RouteErrors.styles.d.ts.map +1 -1
- package/dist/components/RouteErrors/RouteErrors.types.d.ts +3 -1
- package/dist/components/RouteErrors/RouteErrors.types.d.ts.map +1 -1
- package/dist/components/RouteErrors/RouteErrorsModal.d.ts.map +1 -1
- package/dist/components/SearchInput/SearchInput.styles.d.ts +6 -1
- package/dist/components/SearchInput/SearchInput.styles.d.ts.map +1 -1
- package/dist/components/SettingsContainer/SettingsContainer.style.d.ts +23 -151
- package/dist/components/SettingsContainer/SettingsContainer.style.d.ts.map +1 -1
- package/dist/components/SettingsContainer/index.d.ts +1 -1
- package/dist/components/SettingsContainer/index.d.ts.map +1 -1
- package/dist/components/Slippage/Slippage.d.ts.map +1 -1
- package/dist/components/Slippage/Slippage.styles.d.ts +24 -4
- package/dist/components/Slippage/Slippage.styles.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.Placeholder.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.helpers.d.ts +2 -9
- package/dist/components/SwapDetails/SwapDetails.helpers.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.styles.d.ts +35 -153
- package/dist/components/SwapDetails/SwapDetails.styles.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.types.d.ts +1 -1
- package/dist/components/SwapDetails/SwapDetails.types.d.ts.map +1 -1
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.styles.d.ts +6 -1
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.styles.d.ts.map +1 -1
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.types.d.ts +2 -1
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.types.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.WalletState.d.ts +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.WalletState.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.styles.d.ts +6 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.styles.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.types.d.ts +2 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.types.d.ts.map +1 -1
- package/dist/components/SwapsGroup/SwapsGroup.d.ts.map +1 -1
- package/dist/components/SwapsGroup/SwapsGroup.styles.d.ts +24 -4
- package/dist/components/SwapsGroup/SwapsGroup.styles.d.ts.map +1 -1
- package/dist/components/SwitchFromAndTo.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.helpers.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.styles.d.ts +207 -9
- package/dist/components/TokenList/TokenList.styles.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.types.d.ts +1 -1
- package/dist/components/TokenList/TokenList.types.d.ts.map +1 -1
- package/dist/components/UpdateUrl.d.ts +6 -1
- package/dist/components/UpdateUrl.d.ts.map +1 -1
- package/dist/components/WalletModal/WalletModalContent.styles.d.ts +24 -4
- package/dist/components/WalletModal/WalletModalContent.styles.d.ts.map +1 -1
- package/dist/components/WidgetEvents.d.ts.map +1 -1
- package/dist/constants/errors.d.ts +2 -2
- package/dist/constants/routing.d.ts +12 -2
- package/dist/constants/routing.d.ts.map +1 -1
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/globalStyles.d.ts +1 -1
- package/dist/globalStyles.d.ts.map +1 -1
- package/dist/hooks/useNavigateBack.d.ts.map +1 -1
- package/dist/hooks/usePrepareBlockchainList.d.ts +18 -0
- package/dist/hooks/usePrepareBlockchainList.d.ts.map +1 -0
- package/dist/hooks/useSwapInput.d.ts.map +1 -1
- package/dist/hooks/useSyncStoresWithConfig.d.ts +3 -0
- package/dist/hooks/useSyncStoresWithConfig.d.ts.map +1 -0
- package/dist/hooks/useTheme.d.ts +3 -6
- package/dist/hooks/useTheme.d.ts.map +1 -1
- package/dist/hooks/useWalletProviders.d.ts +3 -3
- package/dist/hooks/useWalletProviders.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/pages/ConfirmSwapPage.d.ts.map +1 -1
- package/dist/pages/Home.d.ts.map +1 -1
- package/dist/pages/LiquiditySourcePage.d.ts.map +1 -1
- package/dist/pages/SelectBlockchainPage.d.ts +1 -2
- package/dist/pages/SelectBlockchainPage.d.ts.map +1 -1
- package/dist/pages/SelectSwapItemsPage.d.ts +1 -5
- package/dist/pages/SelectSwapItemsPage.d.ts.map +1 -1
- package/dist/pages/SettingsPage.d.ts.map +1 -1
- package/dist/pages/SwapDetailsPage.d.ts.map +1 -1
- package/dist/pages/WalletsPage.d.ts.map +1 -1
- package/dist/services/httpService.d.ts +0 -1
- package/dist/services/httpService.d.ts.map +1 -1
- package/dist/store/app.d.ts +26 -0
- package/dist/store/app.d.ts.map +1 -0
- package/dist/store/bestRoute.d.ts +4 -8
- package/dist/store/bestRoute.d.ts.map +1 -1
- package/dist/store/meta.d.ts +0 -2
- package/dist/store/meta.d.ts.map +1 -1
- package/dist/store/slices/config.d.ts +8 -0
- package/dist/store/slices/config.d.ts.map +1 -0
- package/dist/store/slices/data.d.ts +26 -0
- package/dist/store/slices/data.d.ts.map +1 -0
- package/dist/store/wallets.d.ts.map +1 -1
- package/dist/types/config.d.ts +3 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/utils/common.d.ts +1 -0
- package/dist/utils/common.d.ts.map +1 -1
- package/dist/utils/configs.d.ts +5 -0
- package/dist/utils/configs.d.ts.map +1 -1
- package/dist/utils/meta.d.ts +1 -0
- package/dist/utils/meta.d.ts.map +1 -1
- package/dist/utils/numbers.d.ts +3 -1
- package/dist/utils/numbers.d.ts.map +1 -1
- package/dist/utils/routing.d.ts +6 -3
- package/dist/utils/routing.d.ts.map +1 -1
- package/dist/utils/settings.d.ts +1 -0
- package/dist/utils/settings.d.ts.map +1 -1
- package/dist/utils/swap.d.ts +1 -1
- package/dist/utils/swap.d.ts.map +1 -1
- package/dist/utils/time.d.ts +2 -2
- package/dist/utils/time.d.ts.map +1 -1
- package/dist/utils/wallets.d.ts +1 -1
- package/dist/utils/wallets.d.ts.map +1 -1
- package/package.json +8 -8
- package/readme.md +3 -1
- package/src/Widget.tsx +22 -3
- package/src/components/AppRouter.tsx +38 -7
- package/src/components/AppRoutes.tsx +4 -28
- package/src/components/BlockchainList/BlockchainList.helpers.ts +1 -1
- package/src/components/BlockchainList/BlockchainList.styles.ts +6 -5
- package/src/components/BlockchainList/BlockchainList.tsx +6 -9
- package/src/components/BlockchainsSection/BlockchainsSection.tsx +29 -42
- package/src/components/ConfirmWalletsModal/ConfirmWallets.helpers.ts +33 -7
- package/src/components/ConfirmWalletsModal/ConfirmWallets.styles.ts +48 -7
- package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.tsx +59 -16
- package/src/components/ConfirmWalletsModal/WalletList.tsx +66 -22
- package/src/components/HeaderButtons/HeaderButtons.styles.ts +2 -2
- package/src/components/HeaderButtons/HeaderButtons.types.ts +1 -0
- package/src/components/HeaderButtons/HomeButtons.tsx +18 -5
- package/src/components/HeaderButtons/UnreadNotificationsBadge.tsx +1 -2
- package/src/components/HeaderButtons/WalletButton.tsx +4 -1
- package/src/components/Layout/Layout.styles.ts +5 -3
- package/src/components/Layout/Layout.tsx +5 -20
- package/src/components/LoadingSwapDetails/LoadingSwapDetailStep.tsx +41 -0
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.styles.ts +78 -0
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.tsx +53 -0
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.types.ts +3 -0
- package/src/components/LoadingSwapDetails/index.ts +1 -0
- package/src/components/NoRoutes/NoRoutes.helper.ts +4 -2
- package/src/components/NotificationContent/NotificationContent.tsx +3 -7
- package/src/components/RouteErrors/RouteErrors.styles.ts +2 -1
- package/src/components/RouteErrors/RouteErrors.tsx +37 -26
- package/src/components/RouteErrors/RouteErrors.types.ts +3 -1
- package/src/components/RouteErrors/RouteErrorsModal.tsx +42 -14
- package/src/components/SettingsContainer/SettingsContainer.style.ts +2 -7
- package/src/components/SettingsContainer/index.ts +0 -1
- package/src/components/Slippage/Slippage.tsx +6 -2
- package/src/components/Slippage/SlippageTooltipContent.tsx +1 -1
- package/src/components/SwapDetails/SwapDetails.Placeholder.tsx +52 -16
- package/src/components/SwapDetails/SwapDetails.helpers.tsx +19 -33
- package/src/components/SwapDetails/SwapDetails.styles.ts +10 -14
- package/src/components/SwapDetails/SwapDetails.tsx +143 -101
- package/src/components/SwapDetails/SwapDetails.types.ts +1 -1
- package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.types.ts +5 -4
- package/src/components/SwapDetailsModal/SwapDetailsModal.WalletState.tsx +6 -7
- package/src/components/SwapDetailsModal/SwapDetailsModal.tsx +3 -0
- package/src/components/SwapDetailsModal/SwapDetailsModal.types.ts +2 -1
- package/src/components/SwapsGroup/SwapsGroup.tsx +3 -2
- package/src/components/SwitchFromAndTo.tsx +1 -35
- package/src/components/TokenList/TokenList.helpers.ts +6 -8
- package/src/components/TokenList/TokenList.styles.ts +7 -1
- package/src/components/TokenList/TokenList.tsx +29 -23
- package/src/components/TokenList/TokenList.types.ts +1 -1
- package/src/components/UpdateUrl.tsx +7 -1
- package/src/components/WidgetEvents.tsx +9 -3
- package/src/constants/errors.ts +2 -2
- package/src/constants/routing.ts +17 -2
- package/src/constants.ts +1 -0
- package/src/globalStyles.ts +1 -4
- package/src/hooks/useFetchBestRoute.ts +2 -2
- package/src/hooks/useNavigateBack.ts +10 -0
- package/src/hooks/usePrepareBlockchainList.ts +125 -0
- package/src/hooks/useSwapInput.ts +17 -3
- package/src/hooks/useSyncStoresWithConfig.ts +102 -0
- package/src/hooks/useTheme.ts +37 -75
- package/src/hooks/useWalletProviders.ts +7 -7
- package/src/pages/ConfirmSwapPage.tsx +65 -36
- package/src/pages/HistoryPage.tsx +2 -2
- package/src/pages/Home.tsx +114 -50
- package/src/pages/LanguagePage.tsx +1 -1
- package/src/pages/LiquiditySourcePage.tsx +22 -18
- package/src/pages/SelectBlockchainPage.tsx +19 -20
- package/src/pages/SelectSwapItemsPage.tsx +66 -88
- package/src/pages/SettingsPage.tsx +42 -15
- package/src/pages/SwapDetailsPage.tsx +9 -2
- package/src/pages/ThemePage.tsx +1 -1
- package/src/pages/WalletsPage.tsx +11 -5
- package/src/services/httpService.ts +4 -5
- package/src/store/app.ts +15 -0
- package/src/store/bestRoute.ts +45 -71
- package/src/store/meta.ts +11 -29
- package/src/store/slices/config.ts +26 -0
- package/src/store/slices/data.ts +203 -0
- package/src/store/wallets.ts +0 -27
- package/src/types/config.ts +3 -0
- package/src/utils/common.ts +3 -0
- package/src/utils/configs.ts +8 -2
- package/src/utils/meta.ts +7 -0
- package/src/utils/numbers.ts +3 -2
- package/src/utils/routing.ts +76 -14
- package/src/utils/settings.ts +15 -0
- package/src/utils/swap.ts +82 -26
- package/src/utils/time.ts +69 -36
- package/src/utils/wallets.ts +49 -29
- package/dist/components/BlockchainsChip/BlockchainsChip.d.ts +0 -5
- package/dist/components/BlockchainsChip/BlockchainsChip.d.ts.map +0 -1
- package/dist/components/BlockchainsChip/BlockchainsChip.styles.d.ts +0 -151
- package/dist/components/BlockchainsChip/BlockchainsChip.styles.d.ts.map +0 -1
- package/dist/components/BlockchainsChip/BlockchainsChip.types.d.ts +0 -6
- package/dist/components/BlockchainsChip/BlockchainsChip.types.d.ts.map +0 -1
- package/dist/components/BlockchainsChip/index.d.ts +0 -2
- package/dist/components/BlockchainsChip/index.d.ts.map +0 -1
- package/dist/components/BlockchainsSection/BlockchainSection.helpers.d.ts +0 -3
- package/dist/components/BlockchainsSection/BlockchainSection.helpers.d.ts.map +0 -1
- package/dist/components/SelectableCategoryList/SelectableCategoryList.d.ts +0 -4
- package/dist/components/SelectableCategoryList/SelectableCategoryList.d.ts.map +0 -1
- package/dist/components/SelectableCategoryList/SelectableCategoryList.helpers.d.ts +0 -4
- package/dist/components/SelectableCategoryList/SelectableCategoryList.helpers.d.ts.map +0 -1
- package/dist/components/SelectableCategoryList/SelectableCategoryList.styles.d.ts.map +0 -1
- package/dist/components/SelectableCategoryList/SelectableCategoryList.types.d.ts +0 -12
- package/dist/components/SelectableCategoryList/SelectableCategoryList.types.d.ts.map +0 -1
- package/dist/components/SelectableCategoryList/index.d.ts +0 -2
- package/dist/components/SelectableCategoryList/index.d.ts.map +0 -1
- package/src/components/BlockchainsChip/BlockchainsChip.styles.ts +0 -30
- package/src/components/BlockchainsChip/BlockchainsChip.tsx +0 -15
- package/src/components/BlockchainsChip/BlockchainsChip.types.ts +0 -4
- package/src/components/BlockchainsChip/index.ts +0 -1
- package/src/components/BlockchainsSection/BlockchainSection.helpers.ts +0 -20
- package/src/components/SelectableCategoryList/SelectableCategoryList.helpers.ts +0 -20
- package/src/components/SelectableCategoryList/SelectableCategoryList.styles.ts +0 -21
- package/src/components/SelectableCategoryList/SelectableCategoryList.tsx +0 -79
- package/src/components/SelectableCategoryList/SelectableCategoryList.types.ts +0 -12
- package/src/components/SelectableCategoryList/index.ts +0 -1
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
Divider,
|
|
15
15
|
IconButton,
|
|
16
16
|
RouteCost,
|
|
17
|
+
RouteSummary,
|
|
17
18
|
StepDetails,
|
|
18
|
-
TokenAmount,
|
|
19
19
|
Typography,
|
|
20
20
|
useCopyToClipboard,
|
|
21
21
|
} from '@rango-dev/ui';
|
|
@@ -24,10 +24,26 @@ import React, { useEffect, useRef, useState } from 'react';
|
|
|
24
24
|
import { useNavigate } from 'react-router-dom';
|
|
25
25
|
|
|
26
26
|
import { navigationRoutes } from '../../constants/navigationRoutes';
|
|
27
|
+
import {
|
|
28
|
+
GAS_FEE_MAX_DECIMALS,
|
|
29
|
+
GAS_FEE_MIN_DECIMALS,
|
|
30
|
+
PERCENTAGE_CHANGE_MAX_DECIMALS,
|
|
31
|
+
PERCENTAGE_CHANGE_MIN_DECIMALS,
|
|
32
|
+
TOKEN_AMOUNT_MAX_DECIMALS,
|
|
33
|
+
TOKEN_AMOUNT_MIN_DECIMALS,
|
|
34
|
+
USD_VALUE_MAX_DECIMALS,
|
|
35
|
+
USD_VALUE_MIN_DECIMALS,
|
|
36
|
+
} from '../../constants/routing';
|
|
27
37
|
import { useNavigateBack } from '../../hooks/useNavigateBack';
|
|
28
38
|
import { useBestRouteStore } from '../../store/bestRoute';
|
|
29
39
|
import { useMetaStore } from '../../store/meta';
|
|
30
|
-
import {
|
|
40
|
+
import { useNotificationStore } from '../../store/notification';
|
|
41
|
+
import {
|
|
42
|
+
numberToString,
|
|
43
|
+
secondsToString,
|
|
44
|
+
totalArrivalTime,
|
|
45
|
+
} from '../../utils/numbers';
|
|
46
|
+
import { getPriceImpactLevel } from '../../utils/routing';
|
|
31
47
|
import {
|
|
32
48
|
getLastConvertedTokenInFailedSwap,
|
|
33
49
|
getPercentageChange,
|
|
@@ -43,48 +59,46 @@ import {
|
|
|
43
59
|
SwapDetailsModal,
|
|
44
60
|
} from '../SwapDetailsModal';
|
|
45
61
|
|
|
46
|
-
import {
|
|
47
|
-
|
|
48
|
-
getPriceImpactWarningLevel,
|
|
49
|
-
getSteps,
|
|
50
|
-
getStepState,
|
|
51
|
-
MIN_DECIMALS,
|
|
52
|
-
PERCENT_DECIMALS,
|
|
53
|
-
RESET_INTERVAL,
|
|
54
|
-
SECONDS,
|
|
55
|
-
} from './SwapDetails.helpers';
|
|
56
|
-
import {
|
|
57
|
-
Container,
|
|
58
|
-
HeaderDetails,
|
|
59
|
-
Separator,
|
|
60
|
-
StepsList,
|
|
61
|
-
} from './SwapDetails.styles';
|
|
62
|
+
import { getSteps, getStepState, RESET_INTERVAL } from './SwapDetails.helpers';
|
|
63
|
+
import { Container, HeaderDetails, StepsList } from './SwapDetails.styles';
|
|
62
64
|
|
|
63
65
|
export function SwapDetails(props: SwapDetailsProps) {
|
|
64
66
|
const { swap, requestId, onDelete, onCancel: onCancelProps } = props;
|
|
65
|
-
const { tokens } = useMetaStore.use.meta();
|
|
66
67
|
const { canSwitchNetworkTo, connect, getWalletInfo } = useWallets();
|
|
67
68
|
const retry = useBestRouteStore.use.retry();
|
|
68
69
|
const navigate = useNavigate();
|
|
69
70
|
const { navigateBackFrom } = useNavigateBack();
|
|
70
|
-
const listRef = useRef(null);
|
|
71
71
|
const [_, handleCopy] = useCopyToClipboard(RESET_INTERVAL);
|
|
72
|
+
const listRef = useRef<HTMLDivElement | null>(null);
|
|
72
73
|
const [modalState, setModalState] = useState<ModalState>(null);
|
|
73
74
|
const [showCompletedModal, setShowCompletedModal] = useState<
|
|
74
75
|
'success' | 'failed' | null
|
|
75
76
|
>(null);
|
|
77
|
+
const {
|
|
78
|
+
meta: { tokens, blockchains },
|
|
79
|
+
} = useMetaStore();
|
|
76
80
|
|
|
77
81
|
const onCancel = () => {
|
|
78
82
|
onCancelProps();
|
|
79
83
|
setModalState(null);
|
|
80
84
|
};
|
|
81
85
|
|
|
86
|
+
const getUnreadNotifications =
|
|
87
|
+
useNotificationStore.use.getUnreadNotifications();
|
|
88
|
+
const setAsRead = useNotificationStore.use.setAsRead();
|
|
89
|
+
const unreadNotifications = getUnreadNotifications();
|
|
82
90
|
const currentStep = getCurrentStep(swap);
|
|
83
91
|
const currentStepNetworkStatus = currentStep?.networkStatus;
|
|
84
92
|
|
|
85
93
|
useEffect(() => {
|
|
86
|
-
|
|
87
|
-
|
|
94
|
+
const existNotification = unreadNotifications.find(
|
|
95
|
+
(n) => n.requestId === swap.requestId
|
|
96
|
+
);
|
|
97
|
+
if (existNotification) {
|
|
98
|
+
if (swap.status === 'success' || swap.status === 'failed') {
|
|
99
|
+
setShowCompletedModal(swap.status);
|
|
100
|
+
setAsRead(swap.requestId);
|
|
101
|
+
}
|
|
88
102
|
}
|
|
89
103
|
}, [swap.status]);
|
|
90
104
|
|
|
@@ -137,35 +151,31 @@ export function SwapDetails(props: SwapDetailsProps) {
|
|
|
137
151
|
showNetworkModal: currentStepNetworkStatus,
|
|
138
152
|
setNetworkModal: setModalState,
|
|
139
153
|
message: stepMessage,
|
|
154
|
+
blockchains,
|
|
140
155
|
});
|
|
141
156
|
const numberOfSteps = steps.length;
|
|
142
157
|
const [firstStep, lastStep] = [swap.steps[0], swap.steps[numberOfSteps - 1]];
|
|
143
158
|
const outputAmount =
|
|
144
159
|
lastStep.outputAmount || lastStep.expectedOutputAmountHumanReadable;
|
|
145
|
-
const percentageChange =
|
|
146
|
-
swap.inputAmount && outputAmount
|
|
147
|
-
? getPercentageChange(swap.inputAmount, outputAmount)
|
|
148
|
-
: null;
|
|
149
160
|
|
|
150
161
|
const totalFee = swap.steps.reduce(
|
|
151
162
|
(totalFee, steps) => totalFee + parseFloat(steps.feeInUsd || ''),
|
|
152
163
|
0
|
|
153
164
|
);
|
|
154
165
|
|
|
155
|
-
const totalTime = swap.steps.reduce(
|
|
156
|
-
(totalTime, step) => totalTime + (step.estimatedTimeInSeconds || 0),
|
|
157
|
-
0
|
|
158
|
-
);
|
|
159
|
-
|
|
160
|
-
const minutes = Math.floor(totalTime / SECONDS);
|
|
161
|
-
|
|
162
166
|
const diagnosisUrl = swap.steps.find(
|
|
163
167
|
(step) => step.diagnosisUrl
|
|
164
168
|
)?.diagnosisUrl;
|
|
165
169
|
|
|
166
170
|
const outputUsdValue = numberToString(
|
|
167
171
|
String(
|
|
168
|
-
parseFloat(
|
|
172
|
+
parseFloat(
|
|
173
|
+
numberToString(
|
|
174
|
+
outputAmount,
|
|
175
|
+
TOKEN_AMOUNT_MIN_DECIMALS,
|
|
176
|
+
TOKEN_AMOUNT_MAX_DECIMALS
|
|
177
|
+
)
|
|
178
|
+
) *
|
|
169
179
|
(getUsdPrice(
|
|
170
180
|
lastStep.toBlockchain,
|
|
171
181
|
lastStep.toSymbol,
|
|
@@ -173,25 +183,58 @@ export function SwapDetails(props: SwapDetailsProps) {
|
|
|
173
183
|
tokens
|
|
174
184
|
) || 0)
|
|
175
185
|
),
|
|
176
|
-
|
|
177
|
-
|
|
186
|
+
USD_VALUE_MIN_DECIMALS,
|
|
187
|
+
USD_VALUE_MAX_DECIMALS
|
|
188
|
+
);
|
|
189
|
+
|
|
190
|
+
const inputUsdValue = numberToString(
|
|
191
|
+
String(
|
|
192
|
+
parseFloat(swap.inputAmount) *
|
|
193
|
+
(getUsdPrice(
|
|
194
|
+
firstStep.fromBlockchain,
|
|
195
|
+
firstStep.fromSymbol,
|
|
196
|
+
firstStep.fromSymbolAddress,
|
|
197
|
+
tokens
|
|
198
|
+
) || 0)
|
|
199
|
+
),
|
|
200
|
+
USD_VALUE_MIN_DECIMALS,
|
|
201
|
+
USD_VALUE_MAX_DECIMALS
|
|
178
202
|
);
|
|
179
203
|
|
|
204
|
+
const percentageChange = getPercentageChange(inputUsdValue, outputUsdValue);
|
|
205
|
+
|
|
180
206
|
const completeModalDesc =
|
|
181
|
-
|
|
182
|
-
?
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
207
|
+
swap.status === 'success'
|
|
208
|
+
? i18n.t({
|
|
209
|
+
id: 'receivedMessage',
|
|
210
|
+
message:
|
|
211
|
+
'You have received {amount} {token} in {conciseAddress} wallet on {chain} chain.',
|
|
212
|
+
values: {
|
|
213
|
+
amount: numberToString(
|
|
214
|
+
outputAmount,
|
|
215
|
+
TOKEN_AMOUNT_MIN_DECIMALS,
|
|
216
|
+
TOKEN_AMOUNT_MAX_DECIMALS
|
|
217
|
+
),
|
|
218
|
+
token: steps[numberOfSteps - 1].to.token.displayName,
|
|
219
|
+
conciseAddress: getConciseAddress(
|
|
220
|
+
swap.wallets[steps[numberOfSteps - 1].to.chain.displayName]
|
|
221
|
+
?.address || ''
|
|
222
|
+
),
|
|
223
|
+
chain: steps[numberOfSteps - 1].to.chain.displayName,
|
|
224
|
+
},
|
|
225
|
+
})
|
|
192
226
|
: `${i18n.t('Transaction was not sent.')} ${
|
|
193
227
|
lastConvertedTokenInFailedSwap
|
|
194
|
-
?
|
|
228
|
+
? i18n.t({
|
|
229
|
+
id: 'remainSymbol',
|
|
230
|
+
message:
|
|
231
|
+
'{amount} {symbol} on {blockchain} remain in your wallet',
|
|
232
|
+
values: {
|
|
233
|
+
amount: lastConvertedTokenInFailedSwap.outputAmount,
|
|
234
|
+
symbol: lastConvertedTokenInFailedSwap.symbol,
|
|
235
|
+
blockchain: lastConvertedTokenInFailedSwap.blockchain,
|
|
236
|
+
},
|
|
237
|
+
})
|
|
195
238
|
: ''
|
|
196
239
|
}`;
|
|
197
240
|
|
|
@@ -261,68 +304,62 @@ export function SwapDetails(props: SwapDetailsProps) {
|
|
|
261
304
|
</Typography>
|
|
262
305
|
</div>
|
|
263
306
|
</HeaderDetails>
|
|
307
|
+
|
|
264
308
|
<div className="output">
|
|
265
309
|
<RouteCost
|
|
266
310
|
fee={numberToString(
|
|
267
311
|
String(totalFee),
|
|
268
|
-
|
|
269
|
-
|
|
312
|
+
GAS_FEE_MIN_DECIMALS,
|
|
313
|
+
GAS_FEE_MAX_DECIMALS
|
|
270
314
|
)}
|
|
271
|
-
time={
|
|
315
|
+
time={secondsToString(totalArrivalTime(swap.steps))}
|
|
272
316
|
steps={numberOfSteps}
|
|
273
317
|
/>
|
|
274
|
-
<
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
AMOUNT_DECIMALS
|
|
282
|
-
),
|
|
283
|
-
usdValue: numberToString(
|
|
284
|
-
String(
|
|
285
|
-
parseFloat(swap.inputAmount) *
|
|
286
|
-
(getUsdPrice(
|
|
287
|
-
firstStep.fromBlockchain,
|
|
288
|
-
firstStep.fromSymbol,
|
|
289
|
-
firstStep.fromSymbolAddress,
|
|
290
|
-
tokens
|
|
291
|
-
) || 0)
|
|
318
|
+
<RouteSummary
|
|
319
|
+
from={{
|
|
320
|
+
price: {
|
|
321
|
+
value: numberToString(
|
|
322
|
+
swap.inputAmount,
|
|
323
|
+
TOKEN_AMOUNT_MIN_DECIMALS,
|
|
324
|
+
TOKEN_AMOUNT_MAX_DECIMALS
|
|
292
325
|
),
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
326
|
+
usdValue: inputUsdValue,
|
|
327
|
+
},
|
|
328
|
+
token: {
|
|
329
|
+
displayName: steps[0].from.token.displayName,
|
|
330
|
+
image: steps[0].from.token.image,
|
|
331
|
+
},
|
|
332
|
+
chain: {
|
|
333
|
+
image: steps[0].from.chain.image,
|
|
334
|
+
displayName: steps[0].from.chain.displayName,
|
|
335
|
+
},
|
|
300
336
|
}}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
337
|
+
to={{
|
|
338
|
+
price: {
|
|
339
|
+
value: numberToString(
|
|
340
|
+
outputAmount,
|
|
341
|
+
TOKEN_AMOUNT_MIN_DECIMALS,
|
|
342
|
+
TOKEN_AMOUNT_MAX_DECIMALS
|
|
343
|
+
),
|
|
344
|
+
usdValue: outputUsdValue,
|
|
345
|
+
},
|
|
346
|
+
token: {
|
|
347
|
+
displayName: steps[numberOfSteps - 1].to.token.displayName,
|
|
348
|
+
image: steps[numberOfSteps - 1].to.token.image,
|
|
349
|
+
},
|
|
350
|
+
chain: {
|
|
351
|
+
image: steps[numberOfSteps - 1].to.chain.image,
|
|
352
|
+
displayName: steps[numberOfSteps - 1].to.chain.displayName,
|
|
353
|
+
},
|
|
318
354
|
}}
|
|
319
|
-
chain={{ image: steps[numberOfSteps - 1].to.chain.image }}
|
|
320
355
|
percentageChange={numberToString(
|
|
321
356
|
percentageChange,
|
|
322
|
-
|
|
323
|
-
|
|
357
|
+
PERCENTAGE_CHANGE_MIN_DECIMALS,
|
|
358
|
+
PERCENTAGE_CHANGE_MAX_DECIMALS
|
|
359
|
+
)}
|
|
360
|
+
warningLevel={getPriceImpactLevel(
|
|
361
|
+
percentageChange?.toNumber() ?? 0
|
|
324
362
|
)}
|
|
325
|
-
warningLevel={getPriceImpactWarningLevel(percentageChange)}
|
|
326
363
|
/>
|
|
327
364
|
</div>
|
|
328
365
|
<div className="title-steps">
|
|
@@ -355,6 +392,7 @@ export function SwapDetails(props: SwapDetailsProps) {
|
|
|
355
392
|
})}
|
|
356
393
|
</StepsList>
|
|
357
394
|
</Container>
|
|
395
|
+
|
|
358
396
|
<SwapDetailsModal
|
|
359
397
|
state={modalState}
|
|
360
398
|
onClose={() => setModalState(null)}
|
|
@@ -367,13 +405,17 @@ export function SwapDetails(props: SwapDetailsProps) {
|
|
|
367
405
|
open={!!showCompletedModal}
|
|
368
406
|
diagnosisUrl={diagnosisUrl}
|
|
369
407
|
onClose={() => setShowCompletedModal(null)}
|
|
370
|
-
status={
|
|
371
|
-
priceValue={numberToString(
|
|
408
|
+
status={swap.status === 'success' ? 'success' : 'failed'}
|
|
409
|
+
priceValue={numberToString(
|
|
410
|
+
outputAmount,
|
|
411
|
+
TOKEN_AMOUNT_MIN_DECIMALS,
|
|
412
|
+
TOKEN_AMOUNT_MAX_DECIMALS
|
|
413
|
+
)}
|
|
372
414
|
usdValue={outputUsdValue}
|
|
373
415
|
percentageChange={numberToString(
|
|
374
416
|
percentageChange,
|
|
375
|
-
|
|
376
|
-
|
|
417
|
+
PERCENTAGE_CHANGE_MIN_DECIMALS,
|
|
418
|
+
PERCENTAGE_CHANGE_MAX_DECIMALS
|
|
377
419
|
)}
|
|
378
420
|
token={{
|
|
379
421
|
displayName: steps[numberOfSteps - 1].to.token.displayName,
|
|
@@ -2,6 +2,7 @@ import type { getSwapMessages } from '../../utils/swap';
|
|
|
2
2
|
import type { ModalState } from '../SwapDetailsModal';
|
|
3
3
|
import type { ConnectResult } from '@rango-dev/wallets-react';
|
|
4
4
|
import type {
|
|
5
|
+
BlockchainMeta,
|
|
5
6
|
PendingSwap,
|
|
6
7
|
PendingSwapNetworkStatus,
|
|
7
8
|
PendingSwapStep,
|
|
@@ -22,7 +23,7 @@ export interface FailedAlertsProps {
|
|
|
22
23
|
message: ReturnType<typeof getSwapMessages>;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
export type GetStep = {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
>;
|
|
26
|
+
export type GetStep = {
|
|
27
|
+
swap: PendingSwap;
|
|
28
|
+
blockchains: BlockchainMeta[];
|
|
29
|
+
} & Omit<SwapAlertsProps, 'step' | 'hasAlreadyProceededToSign'>;
|
|
@@ -4,14 +4,12 @@ import { MessageBox, Wallet, WalletState } from '@rango-dev/ui';
|
|
|
4
4
|
import { useWallets } from '@rango-dev/wallets-react';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
+
import { getContainer } from '../../utils/common';
|
|
8
|
+
|
|
7
9
|
import { WalletContainer } from './SwapDetailsModal.styles';
|
|
8
10
|
|
|
9
|
-
export const WalletStateContent = ({
|
|
10
|
-
type,
|
|
11
|
-
title,
|
|
12
|
-
currentStepWallet,
|
|
13
|
-
message,
|
|
14
|
-
}: WalletStateContentProps) => {
|
|
11
|
+
export const WalletStateContent = (props: WalletStateContentProps) => {
|
|
12
|
+
const { type, title, currentStepWallet, message, showWalletButton } = props;
|
|
15
13
|
const { connect, getWalletInfo, state: walletState } = useWallets();
|
|
16
14
|
const walletType = currentStepWallet?.walletType;
|
|
17
15
|
const isConnected = walletType && walletState(walletType).connected;
|
|
@@ -19,9 +17,10 @@ export const WalletStateContent = ({
|
|
|
19
17
|
return (
|
|
20
18
|
<>
|
|
21
19
|
<MessageBox type={type} title={title} description={message} />
|
|
22
|
-
{walletType && (
|
|
20
|
+
{showWalletButton && walletType && (
|
|
23
21
|
<WalletContainer>
|
|
24
22
|
<Wallet
|
|
23
|
+
container={getContainer()}
|
|
25
24
|
title={getWalletInfo(walletType).name}
|
|
26
25
|
image={getWalletInfo(walletType).img}
|
|
27
26
|
type={walletType}
|
|
@@ -29,6 +29,9 @@ export function SwapDetailsModal(props: ModalPropTypes) {
|
|
|
29
29
|
title={modalNetworkValues[state].title}
|
|
30
30
|
currentStepWallet={currentStepWallet}
|
|
31
31
|
message={message}
|
|
32
|
+
showWalletButton={
|
|
33
|
+
state !== PendingSwapNetworkStatus.WaitingForNetworkChange
|
|
34
|
+
}
|
|
32
35
|
/>
|
|
33
36
|
)}
|
|
34
37
|
{state === 'delete' && (
|
|
@@ -22,7 +22,7 @@ export interface ModalPropTypes {
|
|
|
22
22
|
export interface CompleteModalPropTypes {
|
|
23
23
|
open: boolean;
|
|
24
24
|
onClose: () => void;
|
|
25
|
-
status: 'success' | 'failed'
|
|
25
|
+
status: 'success' | 'failed';
|
|
26
26
|
priceValue: string;
|
|
27
27
|
usdValue: string;
|
|
28
28
|
percentageChange: string;
|
|
@@ -46,6 +46,7 @@ export interface ModalNetworkValueTypes {
|
|
|
46
46
|
export interface WalletStateContentProps extends ModalNetworkValueTypes {
|
|
47
47
|
currentStepWallet: WalletTypeAndAddress | null;
|
|
48
48
|
message: string;
|
|
49
|
+
showWalletButton: boolean;
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
export type CancelContentProps = Pick<ModalPropTypes, 'onClose' | 'onCancel'>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PropTypes } from './SwapsGroup.types';
|
|
2
2
|
|
|
3
|
+
import { i18n } from '@lingui/core';
|
|
3
4
|
import { Divider, SwapListItem, Typography } from '@rango-dev/ui';
|
|
4
5
|
import React from 'react';
|
|
5
6
|
|
|
@@ -35,7 +36,7 @@ export function SwapsGroup(props: PropTypes) {
|
|
|
35
36
|
size="medium"
|
|
36
37
|
color="neutral800"
|
|
37
38
|
className="group-title">
|
|
38
|
-
{group.title}
|
|
39
|
+
{i18n.t(group.title)}
|
|
39
40
|
</Typography>
|
|
40
41
|
</Time>
|
|
41
42
|
<Divider size={4} />
|
|
@@ -69,7 +70,7 @@ export function SwapsGroup(props: PropTypes) {
|
|
|
69
70
|
size="medium"
|
|
70
71
|
color="neutral800"
|
|
71
72
|
className="group-title">
|
|
72
|
-
{group.title}
|
|
73
|
+
{i18n.t(group.title)}
|
|
73
74
|
</Typography>
|
|
74
75
|
</Time>
|
|
75
76
|
<Divider size={4} />
|
|
@@ -1,38 +1,8 @@
|
|
|
1
1
|
import { ReverseIcon, styled } from '@rango-dev/ui';
|
|
2
|
-
import React
|
|
3
|
-
import { useInRouterContext, useSearchParams } from 'react-router-dom';
|
|
2
|
+
import React from 'react';
|
|
4
3
|
|
|
5
|
-
import { SearchParams } from '../constants/searchParams';
|
|
6
4
|
import { useBestRouteStore } from '../store/bestRoute';
|
|
7
5
|
|
|
8
|
-
function SwitchFromAndTo({ count }: { count: number }) {
|
|
9
|
-
const firstRender = useRef(true);
|
|
10
|
-
const [searchParams, setSearchParams] = useSearchParams();
|
|
11
|
-
const outputAmount = useBestRouteStore.use.outputAmount();
|
|
12
|
-
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
if (!firstRender.current) {
|
|
15
|
-
const fromChainString = searchParams.get(SearchParams.FROM_CHAIN);
|
|
16
|
-
const fromTokenString = searchParams.get(SearchParams.FROM_TOKEN);
|
|
17
|
-
const toChainString = searchParams.get(SearchParams.TO_CHAIN);
|
|
18
|
-
const toTokenString = searchParams.get(SearchParams.TO_TOKEN);
|
|
19
|
-
setSearchParams({
|
|
20
|
-
...(toChainString && { [SearchParams.FROM_CHAIN]: toChainString }),
|
|
21
|
-
...(toTokenString && { [SearchParams.FROM_TOKEN]: toTokenString }),
|
|
22
|
-
...(fromChainString && { [SearchParams.TO_CHAIN]: fromChainString }),
|
|
23
|
-
...(fromTokenString && { [SearchParams.TO_TOKEN]: fromTokenString }),
|
|
24
|
-
...(outputAmount && {
|
|
25
|
-
[SearchParams.FROM_AMOUNT]: outputAmount.toString(),
|
|
26
|
-
}),
|
|
27
|
-
});
|
|
28
|
-
} else {
|
|
29
|
-
firstRender.current = false;
|
|
30
|
-
}
|
|
31
|
-
}, [count]);
|
|
32
|
-
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
6
|
const SwitchButtonContainer = styled('div', {
|
|
37
7
|
position: 'absolute',
|
|
38
8
|
bottom: '-12px',
|
|
@@ -58,18 +28,14 @@ const StyledButton = styled('div', {
|
|
|
58
28
|
|
|
59
29
|
export function SwitchFromAndToButton() {
|
|
60
30
|
const switchFromAndTo = useBestRouteStore.use.switchFromAndTo();
|
|
61
|
-
const isRouterInContext = useInRouterContext();
|
|
62
|
-
const [count, setCount] = useState(0);
|
|
63
31
|
|
|
64
32
|
return (
|
|
65
33
|
<SwitchButtonContainer>
|
|
66
34
|
<StyledButton
|
|
67
35
|
onClick={() => {
|
|
68
36
|
switchFromAndTo();
|
|
69
|
-
setCount((prev) => prev + 1);
|
|
70
37
|
}}>
|
|
71
38
|
<ReverseIcon size={12} />
|
|
72
|
-
{isRouterInContext && <SwitchFromAndTo count={count} />}
|
|
73
39
|
</StyledButton>
|
|
74
40
|
</SwitchButtonContainer>
|
|
75
41
|
);
|
|
@@ -3,11 +3,9 @@ import type { TokenWithBalance } from './TokenList.types';
|
|
|
3
3
|
import { containsText } from '../../utils/common';
|
|
4
4
|
|
|
5
5
|
export const filterTokens = (list: TokenWithBalance[], searchedFor: string) =>
|
|
6
|
-
list
|
|
7
|
-
|
|
8
|
-
(token)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
)
|
|
13
|
-
.sort((a, b) => (b.pin as any) - (a.pin as any));
|
|
6
|
+
list.filter(
|
|
7
|
+
(token) =>
|
|
8
|
+
containsText(token.symbol, searchedFor) ||
|
|
9
|
+
containsText(token.address || '', searchedFor) ||
|
|
10
|
+
containsText(token.name || '', searchedFor)
|
|
11
|
+
);
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { styled, Typography } from '@rango-dev/ui';
|
|
2
2
|
|
|
3
|
+
export const Container = styled('div', {
|
|
4
|
+
display: 'flex',
|
|
5
|
+
flexDirection: 'column',
|
|
6
|
+
flexGrow: 1,
|
|
7
|
+
});
|
|
8
|
+
|
|
3
9
|
export const Title = styled('div', {
|
|
4
10
|
display: 'flex',
|
|
5
11
|
alignItems: 'center',
|
|
@@ -11,7 +17,7 @@ export const Title = styled('div', {
|
|
|
11
17
|
},
|
|
12
18
|
});
|
|
13
19
|
export const List = styled('ul', {
|
|
14
|
-
|
|
20
|
+
flexGrow: 1,
|
|
15
21
|
padding: 0,
|
|
16
22
|
margin: 0,
|
|
17
23
|
listStyle: 'none',
|