From ba7a09cd794174b317d3bea3accf6aef1a5fd393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20V=C3=A1clav=C3=ADk?= Date: Thu, 28 Nov 2024 09:05:06 +0100 Subject: [PATCH] refactor(suite): Change alignItems default value (#15609) --- .../components/src/components/Banner/Banner.tsx | 5 ++--- packages/components/src/components/Flex/Flex.tsx | 4 ++-- .../src/components/Tabs/Tabs.stories.tsx | 2 +- .../src/components/form/FormCell/FormCell.tsx | 2 +- .../Passphrase/PassphraseTypeCardContent.tsx | 2 +- .../Passphrase/PassphraseTypeCardHeading.tsx | 2 +- .../PassphraseTypeCardContent.tsx | 2 +- .../PassphraseTypeCardHeading.tsx | 2 +- .../components/SelectAssetModal/AssetItem.tsx | 2 +- .../SelectAssetModal/SelectAssetModal.tsx | 2 +- .../components/backup/AfterBackupCheckboxes.tsx | 2 +- .../components/backup/PreBackupCheckboxes.tsx | 2 +- .../components/dashboard/DashboardSection.tsx | 2 +- .../firmware/ReconnectDevicePrompt.tsx | 4 ++-- packages/suite/src/components/guide/Guide.tsx | 2 +- .../src/components/settings/SettingsSection.tsx | 2 +- .../components/suite/StakingProcess/InfoRow.tsx | 2 +- .../modals/ModalSwitcher/DiscoveryLoader.tsx | 1 + .../ConfirmValueModal/ConfirmValueModal.tsx | 11 +++-------- .../DeviceContextModal/PassphraseModal.tsx | 4 ++-- .../PassphraseWalletConfirmationStep1.tsx | 4 ++-- .../PassphraseWalletConfirmationStep2.tsx | 2 +- .../PassphraseWalletConfirmationStep3.tsx | 2 +- .../AccountTypeSelect/AccountTypeSelect.tsx | 2 +- .../UserContextModal/ClaimModal/ClaimModal.tsx | 2 +- .../DeviceAuthenticityOptOutModal.tsx | 2 +- .../FirmwareRevisionOptOutModal.tsx | 2 +- .../PassphraseDuplicateModal.tsx | 4 ++-- .../UserContextModal/PassphraseMismatchModal.tsx | 6 +----- .../UserContextModal/QrScannerModal.tsx | 11 ++++++++--- .../StakeEthInANutshellModal.tsx | 2 +- .../StakeEthForm/ConfirmStakeEthModal.tsx | 6 +----- .../StakeModal/StakeEthForm/Inputs.tsx | 2 +- .../StakeModal/StakeEthForm/StakeEthForm.tsx | 2 +- .../StakingInfoCards/EstimatedGains.tsx | 6 +++--- .../StakingInfoCards/StakingInfoCards.tsx | 2 +- .../TxDetailModal/AdvancedTxDetails/Data.tsx | 2 +- .../IODetails/AnalyzeInExplorerBanner.tsx | 2 +- .../AdvancedTxDetails/IODetails/IODetails.tsx | 16 +++++++--------- .../TxDetailModal/ChangeFee/GreyCard.tsx | 2 +- .../TxDetailModal/TxDetailModal.tsx | 2 +- .../UnstakeModal/EverstakeModal.tsx | 6 +----- .../UnstakeModal/UnstakeEthForm/Options.tsx | 4 ++-- .../UnstakeEthForm/UnstakeEthForm.tsx | 4 ++-- .../UnstakeModal/UnstakeModal.tsx | 2 +- .../UserContextModal/WipeDeviceModal.tsx | 2 +- .../NotificationGroup/NotificationGroup.tsx | 8 ++++---- .../NotificationList/NotificationList.tsx | 2 +- .../NotificationList/NotificationView.tsx | 2 +- .../components/wallet/AccountExceptionLayout.tsx | 2 +- .../src/components/wallet/Fees/CustomFee.tsx | 2 +- .../suite/src/components/wallet/Fees/Fees.tsx | 2 +- .../AccountException/AccountException.tsx | 8 ++++++-- .../WalletLayout/AccountsMenu/AccountGroup.tsx | 1 - .../WalletLayout/AccountsMenu/AccountItem.tsx | 6 +++--- .../AccountsMenu/AccountItemsGroup.tsx | 2 +- .../WalletLayout/AccountsMenu/AccountsList.tsx | 2 +- packages/suite/src/views/backup/index.tsx | 2 +- .../AssetCard/AssetCardTokensAndStakingInfo.tsx | 2 +- .../dashboard/PortfolioCard/EmptyWallet.tsx | 2 +- .../dashboard/PortfolioCard/PortfolioCard.tsx | 1 - .../PortfolioCard/PortfolioCardException.tsx | 2 +- .../dashboard/StakeEthCard/StakeEthCard.tsx | 2 +- .../steps/SecurityCheck/SecurityCheck.tsx | 2 +- .../SelectBackupType/FloatingSelections.tsx | 2 +- .../SwitchDevice/DeviceItem/AddWalletButton.tsx | 2 +- .../suite/SwitchDevice/DeviceItem/DeviceItem.tsx | 4 ++-- .../SwitchDevice/DeviceItem/ViewOnlyRadios.tsx | 2 +- .../SwitchDevice/DeviceItem/WalletInstance.tsx | 2 +- .../views/suite/SwitchDevice/SwitchDevice.tsx | 2 +- .../src/views/view-only/ViewOnlyPromoContent.tsx | 2 +- .../CoinmarketFormSwitcherExchangeRates.tsx | 2 +- .../CoinmarketForm/CoinmarketFormInputs.tsx | 4 ++-- .../CoinmarketForm/CoinmarketFormLayout.tsx | 2 +- .../CoinmarketForm/CoinmarketFormOffer.tsx | 6 +++--- .../CoinmarketFormOffersSwitcher.tsx | 1 - .../common/CoinmarketLayout/CoinmarketLayout.tsx | 2 +- .../CoinmarketOfferExchangeSend.tsx | 2 +- .../CoinmarketOfferExchangeSendApproval.tsx | 5 +++-- .../CoinmarketOfferExchangeSendSwap.tsx | 6 +++--- .../CoinmarketSelectedOfferInfo.tsx | 2 +- .../CoinmarketVerify/CoinmarketVerify.tsx | 6 +++--- .../suite/src/views/wallet/details/index.tsx | 2 +- .../wallet/receive/components/UsedAddresses.tsx | 2 +- .../src/views/wallet/send/Outputs/Outputs.tsx | 2 +- .../views/wallet/send/TotalSent/TotalSent.tsx | 2 +- .../staking/components/CardanoRedelegate.tsx | 2 +- .../wallet/staking/components/CardanoRewards.tsx | 2 +- .../wallet/staking/components/CardanoStake.tsx | 2 +- .../EthStakingDashboard/components/ApyCard.tsx | 2 +- .../EthStakingDashboard/components/ClaimCard.tsx | 2 +- .../components/EmptyStakingCard.tsx | 2 +- .../components/PayoutCard.tsx | 2 +- .../components/StakingCard.tsx | 2 +- .../components/StakingDashboard.tsx | 4 ++-- .../hooks/useProgressLabelsData.tsx | 2 +- .../tokens/hidden-tokens/HiddenTokensTable.tsx | 4 ++-- .../CoinjoinSummary/CoinjoinBalanceSection.tsx | 2 +- .../TransactionList/NoSearchResults.tsx | 2 +- 99 files changed, 143 insertions(+), 155 deletions(-) diff --git a/packages/components/src/components/Banner/Banner.tsx b/packages/components/src/components/Banner/Banner.tsx index ff54cef1d6d..f42a145ac7c 100755 --- a/packages/components/src/components/Banner/Banner.tsx +++ b/packages/components/src/components/Banner/Banner.tsx @@ -110,14 +110,13 @@ export const Banner = ({ const ContentComponent = ({ children }: { children: ReactNode }) => { const commonProps = { justifyContent: 'space-between' as const, + alignItems: 'center' as const, gap: spacings.lg, flex: '1' as const, }; return isMobile ? ( - - {children} - + {children} ) : ( {children} ); diff --git a/packages/components/src/components/Flex/Flex.tsx b/packages/components/src/components/Flex/Flex.tsx index 8fec08e74ae..0b33d68dab1 100644 --- a/packages/components/src/components/Flex/Flex.tsx +++ b/packages/components/src/components/Flex/Flex.tsx @@ -160,7 +160,7 @@ export type FlexProps = AllowedFrameProps & { export const Flex = ({ gap = 0, justifyContent = 'flex-start', - alignItems = 'center', + alignItems = 'normal', children, direction = 'row', flex = 'initial', @@ -207,4 +207,4 @@ export const Flex = ({ }; export const Column = (props: FlexProps) => ; -export const Row = (props: FlexProps) => ; +export const Row = (props: FlexProps) => ; diff --git a/packages/components/src/components/Tabs/Tabs.stories.tsx b/packages/components/src/components/Tabs/Tabs.stories.tsx index a066a06f1a6..f745e162f30 100644 --- a/packages/components/src/components/Tabs/Tabs.stories.tsx +++ b/packages/components/src/components/Tabs/Tabs.stories.tsx @@ -79,7 +79,7 @@ const TabsApp = (props: Partial) => { }; return ( - + {items.map(item => ( diff --git a/packages/components/src/components/form/FormCell/FormCell.tsx b/packages/components/src/components/form/FormCell/FormCell.tsx index 09cae3415cd..e03ca652993 100644 --- a/packages/components/src/components/form/FormCell/FormCell.tsx +++ b/packages/components/src/components/form/FormCell/FormCell.tsx @@ -84,7 +84,7 @@ export const FormCell = ({ onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} > - + - + {type === 'hidden' && ( <> diff --git a/packages/connect-ui/src/components/Passphrase/PassphraseTypeCardHeading.tsx b/packages/connect-ui/src/components/Passphrase/PassphraseTypeCardHeading.tsx index af064f26daa..586eafc4778 100644 --- a/packages/connect-ui/src/components/Passphrase/PassphraseTypeCardHeading.tsx +++ b/packages/connect-ui/src/components/Passphrase/PassphraseTypeCardHeading.tsx @@ -68,7 +68,7 @@ export const PassphraseTypeCardHeading = ({ )} - + - + {type === 'hidden' && ( <> diff --git a/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCardHeading.tsx b/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCardHeading.tsx index 4b7607f5313..8574cb22ee3 100644 --- a/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCardHeading.tsx +++ b/packages/product-components/src/components/PassphraseTypeCard/PassphraseTypeCardHeading.tsx @@ -68,7 +68,7 @@ export const PassphraseTypeCardHeading = ({ )} - + )} - + diff --git a/packages/product-components/src/components/SelectAssetModal/SelectAssetModal.tsx b/packages/product-components/src/components/SelectAssetModal/SelectAssetModal.tsx index 150955b7084..6d65f35b045 100644 --- a/packages/product-components/src/components/SelectAssetModal/SelectAssetModal.tsx +++ b/packages/product-components/src/components/SelectAssetModal/SelectAssetModal.tsx @@ -62,7 +62,7 @@ export const SelectAssetModal = ({ onCancel={onClose} size="small" > - + {searchInput} {filterTabs} diff --git a/packages/suite/src/components/backup/AfterBackupCheckboxes.tsx b/packages/suite/src/components/backup/AfterBackupCheckboxes.tsx index 5f43007379f..8d2bb9fae80 100644 --- a/packages/suite/src/components/backup/AfterBackupCheckboxes.tsx +++ b/packages/suite/src/components/backup/AfterBackupCheckboxes.tsx @@ -13,7 +13,7 @@ export const AfterBackupCheckboxes = () => { return ( - + dispatch(toggleCheckboxByKey('wrote-seed-properly'))} diff --git a/packages/suite/src/components/backup/PreBackupCheckboxes.tsx b/packages/suite/src/components/backup/PreBackupCheckboxes.tsx index 58859f487cf..e3828faf90d 100644 --- a/packages/suite/src/components/backup/PreBackupCheckboxes.tsx +++ b/packages/suite/src/components/backup/PreBackupCheckboxes.tsx @@ -13,7 +13,7 @@ export const PreBackupCheckboxes = () => { return ( - + dispatch(toggleCheckboxByKey('has-enough-time'))} diff --git a/packages/suite/src/components/dashboard/DashboardSection.tsx b/packages/suite/src/components/dashboard/DashboardSection.tsx index 0d688597f82..ba58d38ac45 100644 --- a/packages/suite/src/components/dashboard/DashboardSection.tsx +++ b/packages/suite/src/components/dashboard/DashboardSection.tsx @@ -15,7 +15,7 @@ export const DashboardSection = forwardRef( ref: Ref, ) => (
- + {heading && (

diff --git a/packages/suite/src/components/firmware/ReconnectDevicePrompt.tsx b/packages/suite/src/components/firmware/ReconnectDevicePrompt.tsx index afbc8a49c81..6276ef71eaf 100644 --- a/packages/suite/src/components/firmware/ReconnectDevicePrompt.tsx +++ b/packages/suite/src/components/firmware/ReconnectDevicePrompt.tsx @@ -164,7 +164,7 @@ export const ReconnectDevicePrompt = ({ onClose, onSuccess }: ReconnectDevicePro } > {!isRebootDone && ( - +

{!isRebootDone && ( - + {isManualRebootRequired ? ( {/* First step asks for disconnecting a device */} diff --git a/packages/suite/src/components/guide/Guide.tsx b/packages/suite/src/components/guide/Guide.tsx index 7636ec73778..9095fc845c7 100644 --- a/packages/suite/src/components/guide/Guide.tsx +++ b/packages/suite/src/components/guide/Guide.tsx @@ -77,7 +77,7 @@ export const Guide = () => { return ( } /> - + {!searchActive && } diff --git a/packages/suite/src/components/settings/SettingsSection.tsx b/packages/suite/src/components/settings/SettingsSection.tsx index 68684f25675..0aff6bd93d9 100644 --- a/packages/suite/src/components/settings/SettingsSection.tsx +++ b/packages/suite/src/components/settings/SettingsSection.tsx @@ -86,7 +86,7 @@ export const SettingsSection = ({ - + {children} diff --git a/packages/suite/src/components/suite/StakingProcess/InfoRow.tsx b/packages/suite/src/components/suite/StakingProcess/InfoRow.tsx index 6f7ecd6ff5c..75a0aaf2971 100644 --- a/packages/suite/src/components/suite/StakingProcess/InfoRow.tsx +++ b/packages/suite/src/components/suite/StakingProcess/InfoRow.tsx @@ -22,7 +22,7 @@ export const InfoRow = ({ heading, subheading, content, isExpanded = false }: In return ( - + {heading} diff --git a/packages/suite/src/components/suite/modals/ModalSwitcher/DiscoveryLoader.tsx b/packages/suite/src/components/suite/modals/ModalSwitcher/DiscoveryLoader.tsx index 642adb33a3e..10375f97191 100644 --- a/packages/suite/src/components/suite/modals/ModalSwitcher/DiscoveryLoader.tsx +++ b/packages/suite/src/components/suite/modals/ModalSwitcher/DiscoveryLoader.tsx @@ -16,6 +16,7 @@ export const DiscoveryLoader = () => { diff --git a/packages/suite/src/components/suite/modals/ReduxModal/ConfirmValueModal/ConfirmValueModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/ConfirmValueModal/ConfirmValueModal.tsx index 076227fbcd8..22a184c9e39 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/ConfirmValueModal/ConfirmValueModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/ConfirmValueModal/ConfirmValueModal.tsx @@ -114,7 +114,7 @@ export const ConfirmValueModal = ({ description={showTokensSubheading && } onCancel={isCancelable ? onCancel : undefined} > - + {!device?.connected && ( @@ -129,7 +129,7 @@ export const ConfirmValueModal = ({ )} - + - + diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseModal.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseModal.tsx index da98a08d265..d5575a44f55 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseModal.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseModal.tsx @@ -87,7 +87,7 @@ export const PassphraseModal = ({ device }: PassphraseModalProps) => { isFullHeaderVisible icon="x" > - +

@@ -119,7 +119,7 @@ export const PassphraseModal = ({ device }: PassphraseModalProps) => { onBackButtonClick={onEnterPassphraseDialogBack} isFullHeaderVisible > - +

diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep1.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep1.tsx index a70f5317bfc..3617a89b11b 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep1.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep1.tsx @@ -36,7 +36,7 @@ export const PassphraseWalletConfirmationStep1 = ({ ); return ( - +

@@ -61,7 +61,7 @@ export const PassphraseWalletConfirmationStep1 = ({
} > - + diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep2.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep2.tsx index 84006102d63..2054bd3bc49 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep2.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep2.tsx @@ -14,7 +14,7 @@ type PassphraseWalletConfirmationStep2Props = { export const PassphraseWalletConfirmationStep2 = ({ setContentType, }: PassphraseWalletConfirmationStep2Props) => ( - +

diff --git a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep3.tsx b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep3.tsx index 9310dc69f55..412d8b03231 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep3.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/DeviceContextModal/PassphraseWalletConfirmationStep3.tsx @@ -20,7 +20,7 @@ export const PassphraseWalletConfirmationStep3 = ({ const deviceFeatures = useSelector(selectDeviceFeatures); return ( - +

diff --git a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeSelect.tsx b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeSelect.tsx index 7a2caf35f7a..9f82204829c 100644 --- a/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeSelect.tsx +++ b/packages/suite/src/components/suite/modals/ReduxModal/UserContextModal/AddAccountModal/AccountTypeSelect/AccountTypeSelect.tsx @@ -68,7 +68,7 @@ export const AccountTypeSelect = ({ const bip43PathToDescribe = selectedAccountType?.bip43Path ?? defaultAccountType.bip43Path; return ( - +