Skip to content

Commit

Permalink
fix(swap): fix icon color and alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
blockdylanb committed Jun 7, 2021
1 parent 51c094f commit f068244
Showing 1 changed file with 30 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ const ToolTipText = styled.div`
}
`

const ExchangeRateRow = styled.div`
display: flex;
`
const IconWrapper = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
cursor: pointer;
margin-left: 4px;
`
class PreviewSwap extends PureComponent<InjectedFormProps<{}, Props> & Props, State> {
constructor(props) {
super(props)
Expand Down Expand Up @@ -145,22 +155,26 @@ class PreviewSwap extends PureComponent<InjectedFormProps<{}, Props> & Props, St
<StyledRow>
<div>
<Title>
<TextGroup inline>
<FormattedMessage
id='modals.simplebuy.confirm.rate'
defaultMessage='Exchange Rate'
/>
<Icon
name='question-in-circle-filled'
size='16px'
color='blue600'
onClick={() =>
this.setState((prevState) => ({
isActiveExchangeToolTip: !prevState.isActiveExchangeToolTip
}))
}
/>
</TextGroup>
<ExchangeRateRow>
<Text color='grey900' weight={500}>
<FormattedMessage
id='modals.simplebuy.confirm.rate'
defaultMessage='Exchange Rate'
/>
</Text>
<IconWrapper>
<Icon
name='question-in-circle-filled'
size='16px'
color={this.state.isActiveExchangeToolTip ? 'blue600' : 'grey300'}
onClick={() =>
this.setState((prevState) => ({
isActiveExchangeToolTip: !prevState.isActiveExchangeToolTip
}))
}
/>
</IconWrapper>
</ExchangeRateRow>
</Title>
<Value data-e2e='swapExchangeRate'>
{this.props.quoteR.cata({
Expand Down

0 comments on commit f068244

Please sign in to comment.