From bc3371079db50cca312ac23b7a39c436bcbb443c Mon Sep 17 00:00:00 2001 From: NeOMakinG <14963751+NeOMakinG@users.noreply.github.com> Date: Wed, 12 Feb 2025 07:53:02 +0800 Subject: [PATCH] fix: import account style on mobile (#8798) * fix: import account style on mobile * fix: cross --- .../components/DrawerContent.tsx | 4 ++-- .../components/DrawerWrapper.tsx | 2 +- .../components/ImportAccounts.tsx | 24 +++++++++++++++++-- .../components/SelectChain.tsx | 7 +++++- 4 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/components/ManageAccountsDrawer/components/DrawerContent.tsx b/src/components/ManageAccountsDrawer/components/DrawerContent.tsx index ee884262dee..b5a0a985c4c 100644 --- a/src/components/ManageAccountsDrawer/components/DrawerContent.tsx +++ b/src/components/ManageAccountsDrawer/components/DrawerContent.tsx @@ -16,7 +16,7 @@ export const DrawerContentWrapper = ({ }: DrawerContentWrapperProps) => { return ( <> - + {title && {title}} {description && ( @@ -25,7 +25,7 @@ export const DrawerContentWrapper = ({ )} {body && {body}} - {footer} + {footer} ) } diff --git a/src/components/ManageAccountsDrawer/components/DrawerWrapper.tsx b/src/components/ManageAccountsDrawer/components/DrawerWrapper.tsx index 9718066e563..a9804fe13dc 100644 --- a/src/components/ManageAccountsDrawer/components/DrawerWrapper.tsx +++ b/src/components/ManageAccountsDrawer/components/DrawerWrapper.tsx @@ -12,7 +12,7 @@ export const DrawerWrapper = ({ children, isOpen, onClose, variant }: DrawerWrap - + {children} diff --git a/src/components/ManageAccountsDrawer/components/ImportAccounts.tsx b/src/components/ManageAccountsDrawer/components/ImportAccounts.tsx index ae32cd518e7..6ed389e3813 100644 --- a/src/components/ManageAccountsDrawer/components/ImportAccounts.tsx +++ b/src/components/ManageAccountsDrawer/components/ImportAccounts.tsx @@ -120,11 +120,23 @@ const TableRow = forwardRef( )) }, [asset, isAccountActive, otherAccountIds, ref]) + const toggleSize = useMemo( + () => ({ + base: 'md', + md: 'lg', + }), + [], + ) + return ( <> - + {accountNumber} @@ -397,6 +409,14 @@ export const ImportAccounts = ({ chainId, onClose }: ImportAccountsProps) => { }) }, [accounts, asset, handleToggleAccountIds]) + const tableSize = useMemo( + () => ({ + base: 'sm', + md: 'md', + }), + [], + ) + if (!asset) { console.error(`No fee asset found for chainId: ${chainId}`) return null @@ -430,7 +450,7 @@ export const ImportAccounts = ({ chainId, onClose }: ImportAccountsProps) => { body={ <> - +
{accountRows} {(isFetching || isLoading || autoFetching) && ( diff --git a/src/components/ManageAccountsDrawer/components/SelectChain.tsx b/src/components/ManageAccountsDrawer/components/SelectChain.tsx index 3722f5241d4..bc38322288f 100644 --- a/src/components/ManageAccountsDrawer/components/SelectChain.tsx +++ b/src/components/ManageAccountsDrawer/components/SelectChain.tsx @@ -26,6 +26,11 @@ export type SelectChainProps = { onClose: () => void } +const buttonsStackColumns = { + base: 2, + md: 3, +} + const ChainButton = ({ chainId, onClick, @@ -104,7 +109,7 @@ export const SelectChain = ({ onSelectChainId, onClose }: SelectChainProps) => { placeholder={translate('accountManagement.selectChain.searchChains')} inputGroupProps={inputGroupProps} /> - + {chainButtons}