Skip to content

Commit

Permalink
fix(simple buy): different header actions depending on selectedCurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip London committed Apr 2, 2020
1 parent d3ba04f commit f49e8df
Showing 1 changed file with 39 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@ const Wrapper = styled.div`
flex-direction: column;
height: 100%;
`
const TopText = styled(Text)`
const Top = styled(Text)`
display: flex;
width: 100%;
align-items: center;
justify-content: space-between;
`
const TopText = styled(Text)`
display: flex;
align-items: center;
flex-direction: row;
`

const SubTitleText = styled(Text)`
margin-top: 24px;
`
Expand Down Expand Up @@ -125,20 +130,38 @@ const CurrencySelection: React.FC<
<Wrapper>
<Form>
<FlyoutWrapper>
<TopText color='grey900' size='20px' weight={600}>
<Icon
onClick={() => props.simpleBuyActions.showModal()}
cursor
name='arrow-left'
size='20px'
color='grey600'
style={{ marginRight: '24px' }}
/>
<FormattedMessage
id='modals.simplebuy.selectcurrency'
defaultMessage='Select Your Currency'
/>
</TopText>
<Top color='grey900' size='20px' weight={600}>
<TopText color='grey900' size='20px' weight={600}>
{!selectedCurrency && (
<Icon
onClick={props.handleClose}
cursor
name='close'
size='20px'
color='grey600'
style={{ marginRight: '24px' }}
/>
)}
<FormattedMessage
id='modals.simplebuy.selectcurrency'
defaultMessage='Select Your Currency'
/>
</TopText>
{selectedCurrency && (
<Icon
onClick={() =>
props.simpleBuyActions.setStep({
step: 'ENTER_AMOUNT',
fiatCurrency: selectedCurrency
})
}
cursor
name='arrow-right'
size='20px'
color='grey600'
/>
)}
</Top>
<SubTitleText color='grey600' weight={500}>
<FormattedMessage
id='modals.simplebuy.localcurrency'
Expand Down

0 comments on commit f49e8df

Please sign in to comment.