diff --git a/src/components/ui/text/amount-text.tsx b/src/components/ui/text/amount-text.tsx index 919cb14d..a6a078c2 100644 --- a/src/components/ui/text/amount-text.tsx +++ b/src/components/ui/text/amount-text.tsx @@ -40,19 +40,21 @@ export const AmountText = ({ return ( - {num && ( - <> - - {num[0]} - - - {decimalValue(num)} - - - {denom} - - - )} +
+ {num && ( + <> + + {num[0]} + + + {decimalValue(num)} + + + {denom} + + + )} +
); }; diff --git a/src/components/view/main-active-list/main-active-list.tsx b/src/components/view/main-active-list/main-active-list.tsx index 9574df98..fbdf6077 100644 --- a/src/components/view/main-active-list/main-active-list.tsx +++ b/src/components/view/main-active-list/main-active-list.tsx @@ -8,6 +8,7 @@ import ActiveBoards from './active-boards'; import Text from '@/components/ui/text'; import {AmountText} from '@/components/ui/text/amount-text'; import {TextProps} from '@/components/ui/text/text'; +import {PaletteKeyType} from '@/styles'; interface StyledTextProps extends TextProps { width?: string; @@ -101,10 +102,22 @@ export const StyledText = styled(Text)` ${textStyle}; `; -export const StyledAmountText = styled(AmountText)<{width?: string}>` +export const StyledAmountText = styled(AmountText)<{width?: string; color?: PaletteKeyType}>` min-width: ${({width}) => width}; max-width: ${({width}) => width}; - ${textStyle}; + ${textStyle} + + & .amount-wrapper { + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + color: ${({theme, color}) => theme.colors[color ?? 'reverse']}; + & * { + display: inline; + white-space: nowrap; + } + } `; export const FitContentA = styled.a`