diff --git a/packages/widget/src/components/Token/Token.style.tsx b/packages/widget/src/components/Token/Token.style.tsx index f9fdb039a..28846641d 100644 --- a/packages/widget/src/components/Token/Token.style.tsx +++ b/packages/widget/src/components/Token/Token.style.tsx @@ -1,13 +1,9 @@ import { Box, Typography } from '@mui/material'; import { styled } from '@mui/material/styles'; -export const TextSecondary = styled(Typography, { +export const TextSecondaryContainer = styled(Box, { shouldForwardProp: (prop) => prop !== 'connected', })<{ connected?: boolean }>(({ theme, connected }) => ({ - fontSize: 12, - lineHeight: 1, - fontWeight: 500, - color: theme.palette.text.secondary, borderLeftWidth: connected ? 2 : 0, borderLeftStyle: 'solid', borderColor: @@ -16,12 +12,23 @@ export const TextSecondary = styled(Typography, { : theme.palette.grey[800], margin: connected ? theme.spacing(0.5, 0, 0, 1.875) - : theme.spacing(0.5, 0, 0, 6), + : theme.spacing(0, 0, 0, 6), padding: connected ? theme.spacing(0, 0, 0, 3.875) : theme.spacing(0, 0, 0, 0), display: 'flex', alignItems: 'flex-start', + flexWrap: 'wrap', +})); + +export const TextSecondary = styled(Typography, { + shouldForwardProp: (prop) => prop !== 'connected', +})<{ connected?: boolean }>(({ theme, connected }) => ({ + fontSize: 12, + lineHeight: 1, + fontWeight: 500, + color: theme.palette.text.secondary, + marginTop: connected ? 0 : theme.spacing(0.5), })); export const TokenDivider = styled(Box)(({ theme }) => ({ diff --git a/packages/widget/src/components/Token/Token.tsx b/packages/widget/src/components/Token/Token.tsx index 2ee2b26c0..b2bdf3820 100644 --- a/packages/widget/src/components/Token/Token.tsx +++ b/packages/widget/src/components/Token/Token.tsx @@ -8,7 +8,7 @@ import { formatTokenAmount } from '../../utils'; import { SmallAvatar } from '../SmallAvatar'; import { TextFitter } from '../TextFitter'; import { TokenAvatar } from '../TokenAvatar'; -import { TextSecondary } from './Token.style'; +import { TextSecondary, TextSecondaryContainer } from './Token.style'; export const Token: React.FC< { token: TokenAmount; connected?: boolean; step?: Step } & BoxProps @@ -28,7 +28,7 @@ export const Token: React.FC< {formatTokenAmount(token.amount, token.decimals)} - + {t(`swap.tokenOnChain`, { tokenSymbol: token.symbol, @@ -36,39 +36,42 @@ export const Token: React.FC< })} {step ? ( - + <> - - + + + {step.toolDetails.name[0]} + + + - {step.toolDetails.name[0]} - + {step.toolDetails.name} + - - {step.toolDetails.name} - - + ) : null} - + ); };