File tree Expand file tree Collapse file tree 3 files changed +31
-11
lines changed Expand file tree Collapse file tree 3 files changed +31
-11
lines changed Original file line number Diff line number Diff line change 143143 position : absolute;
144144 top : -8px ;
145145 left : -1px ;
146- padding : 1px 8px ;
146+ padding : 1px 22 px 1 px 8px ;
147147 border-radius : 4px ;
148148 border-bottom-left-radius : 0 ;
149149 background : # 0155ff ;
152152 font-weight : bold;
153153}
154154
155+ .profitInfoIcon {
156+ position : absolute;
157+ top : 1px ;
158+ right : 4px ;
159+ display : flex;
160+ width : 14px ;
161+ fill : currentColor;
162+ }
163+
155164.slippageToleranceBtn {
156165 margin-right : 8px ;
157166 vertical-align : bottom;
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import { Select } from 'ui/components/ui/select/Select';
2727import { Tooltip } from 'ui/components/ui/tooltip' ;
2828import { UsdAmount } from 'ui/components/ui/UsdAmount' ;
2929
30+ import { InfoIcon } from '../../../../icons/info' ;
3031import * as styles from './form.module.css' ;
3132import { SwapLayout } from './layout' ;
3233
@@ -702,22 +703,32 @@ export function SwapForm({
702703 < div className = { styles . toAmountCardBadge } >
703704 { profitTokens != null && ! profitTokens . eq ( 0 ) ? (
704705 < >
705- { t ( 'swap.profitLabel' ) } : +
706- { profitTokens . toFixed (
707- toAsset . precision ,
708- BigNumber . ROUND_MODE . ROUND_FLOOR
709- ) } { ' ' }
710- { toAsset . displayName }
706+ { t ( 'swap.profitLabel' ) } :
711707 { usdPrice && usdPrice !== '1' && (
712708 < >
713709 { ' ' }
714- (≈ $
710+ $
715711 { new BigNumber ( usdPrice )
716712 . mul ( profitTokens )
717713 . toFixed ( 2 ) }
718- )
719714 </ >
720- ) }
715+ ) } { ' ' }
716+ < Tooltip
717+ content = { `${ profitTokens . toFixed (
718+ toAsset . precision ,
719+ BigNumber . ROUND_MODE . ROUND_FLOOR
720+ ) } ${ toAsset . displayName } `}
721+ placement = "top"
722+ >
723+ { props => (
724+ < span
725+ { ...props }
726+ className = { styles . profitInfoIcon }
727+ >
728+ < InfoIcon />
729+ </ span >
730+ ) }
731+ </ Tooltip >
721732 </ >
722733 ) : (
723734 t ( 'swap.primaryLabel' )
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ interface Props {
1414 ref : React . MutableRefObject < any > ;
1515 onMouseEnter : ( ) => void ;
1616 onMouseLeave : ( ) => void ;
17- } ) => React . ReactChild ;
17+ } ) => React . ReactNode ;
1818 content : React . ReactNode ;
1919 placement ?: Placement ;
2020}
You can’t perform that action at this time.
0 commit comments