Skip to content

Commit

Permalink
fix: fix swap price alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
RyukTheCoder authored and mikasackermn committed Jul 20, 2024
1 parent 9416939 commit e8e3bbb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions widget/ui/src/components/TokenAmount/TokenAmount.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ export const usdValueStyles = css({
display: 'flex',
paddingTop: '$5',
});

export const tooltipRootStyle = {
width: 'fit-content',
};
3 changes: 2 additions & 1 deletion widget/ui/src/components/TokenAmount/TokenAmount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { Typography } from '../Typography';
import {
Container,
tokenAmountStyles,
tooltipRootStyle,
usdValueStyles,
} from './TokenAmount.styles';

Expand All @@ -34,6 +35,7 @@ export function TokenAmount(props: PropTypes) {
)}
<div>
<NumericTooltip
styles={{ root: tooltipRootStyle }}
content={props.price.realValue}
open={!props.price.realValue ? false : undefined}
container={props.tooltipContainer}>
Expand Down Expand Up @@ -64,7 +66,6 @@ export function TokenAmount(props: PropTypes) {
<Typography size="small" variant="body">
{`~$${props.price.usdValue}`}
</Typography>
<Divider direction="horizontal" size={4} />
</ValueTypography>
)}
</NumericTooltip>
Expand Down

0 comments on commit e8e3bbb

Please sign in to comment.