-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(whats-new-wallet-tour): Added option to take wallet tour by clic…
…king what's new
- Loading branch information
1 parent
c488fc5
commit b776040
Showing
2 changed files
with
98 additions
and
7 deletions.
There are no files selected for viewing
81 changes: 81 additions & 0 deletions
81
.../blockchain-wallet-v4-frontend/src/services/WhatsNewService/WhatsNewContent/WalletTour.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import React from 'react' | ||
import styled from 'styled-components' | ||
import { connect } from 'react-redux' | ||
import { FormattedMessage } from 'react-intl' | ||
import { Button, Text } from 'blockchain-info-components' | ||
import { Container, Row } from 'components/WhatsNew' | ||
import { bindActionCreators } from 'redux' | ||
|
||
import media from 'services/ResponsiveService' | ||
import { actions } from 'data' | ||
|
||
const DarkText = styled(Text).attrs({ | ||
color: 'gray-5', | ||
size: '16px', | ||
weight: 300 | ||
})` | ||
display: inline; | ||
${media.laptop` | ||
display: ${props => (props.hideOnMobile ? 'none' : 'inline')}; | ||
`}; | ||
` | ||
const GetStartedButton = styled(Button).attrs({ | ||
nature: 'primary', | ||
fullwidth: true | ||
})` | ||
font-weight: 500; | ||
${media.laptop` | ||
width: 100%; | ||
`}; | ||
` | ||
|
||
const WalletTour = ({ onRightTrayClose, onTakeTour }) => { | ||
const onTakeWalletTour = () => { | ||
onRightTrayClose() | ||
onTakeTour() | ||
} | ||
return ( | ||
<Container> | ||
<Row marginBottom='10px'> | ||
<Text color='brand-primary' size='24px' weight={600}> | ||
<FormattedMessage | ||
defaultMessage='Wallet Tour' | ||
id='layouts.wallet.trayright.whatsnew.whatsnewcontent.wallet.tour' | ||
/> | ||
</Text> | ||
</Row> | ||
<Row marginBottom='24px'> | ||
<DarkText> | ||
<FormattedMessage | ||
defaultMessage="Welcome to your Wallet. Discover your Wallet's tools and features by taking a quick tour." | ||
id='layouts.wallet.trayright.whatsnew.whatsnewcontent.wallet.tour.content' | ||
/> | ||
</DarkText> | ||
</Row> | ||
<Row> | ||
<GetStartedButton onClick={onTakeWalletTour}> | ||
<FormattedMessage | ||
id='layouts.wallet.trayright.whatsnew.whatsnewcontent.wallet.tour.start' | ||
defaultMessage='Take The Tour Now' | ||
/> | ||
</GetStartedButton> | ||
</Row> | ||
</Container> | ||
) | ||
} | ||
|
||
const mapDispatchToProps = dispatch => ({ | ||
onRightTrayClose: bindActionCreators( | ||
actions.components.layoutWallet.layoutWalletTrayCloseClicked, | ||
dispatch | ||
), | ||
onTakeTour: bindActionCreators( | ||
actions.components.onboarding.takeWalletTourClicked, | ||
dispatch | ||
) | ||
}) | ||
|
||
export default connect( | ||
null, | ||
mapDispatchToProps | ||
)(WalletTour) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters