NastiaS
7 years ago
2 changed files with 79 additions and 15 deletions
@ -1,34 +1,93 @@ |
|||||
// @flow
|
// @flow
|
||||
|
|
||||
import React from 'react' |
import React from 'react' |
||||
|
import { shell } from 'electron' |
||||
|
import styled from 'styled-components' |
||||
|
|
||||
import Box from 'components/base/Box' |
import Box from 'components/base/Box' |
||||
import Button from 'components/base/Button' |
import Button from 'components/base/Button' |
||||
import Text from 'components/base/Text' |
|
||||
|
|
||||
import IconFinishOnboarding from 'icons/LockScreen' |
import IconCheckCircle from 'icons/CheckCircle' |
||||
|
import IconSocialTwitter from 'icons/Eye' |
||||
|
import IconSocialReddit from 'icons/User' |
||||
|
import IconSocialGithub from 'icons/Share' |
||||
|
|
||||
import type { StepProps } from '..' |
import type { StepProps } from '..' |
||||
import { Title, Description } from '../helperComponents' |
import { Title, Description } from '../helperComponents' |
||||
|
|
||||
|
const socialMedia = [ |
||||
|
{ |
||||
|
key: 'twitter', |
||||
|
url: 'https://twitter.com/LedgerHQ', |
||||
|
icon: <IconSocialTwitter size={24} />, |
||||
|
onClick: url => shell.openExternal(url), |
||||
|
}, |
||||
|
{ |
||||
|
key: 'reddit', |
||||
|
url: 'https://www.reddit.com/r/ledgerwallet/', |
||||
|
icon: <IconSocialReddit size={24} />, |
||||
|
onClick: url => shell.openExternal(url), |
||||
|
}, |
||||
|
{ |
||||
|
key: 'github', |
||||
|
url: 'https://github.com/LedgerHQ', |
||||
|
icon: <IconSocialGithub size={24} />, |
||||
|
onClick: url => shell.openExternal(url), |
||||
|
}, |
||||
|
] |
||||
|
|
||||
export default (props: StepProps) => { |
export default (props: StepProps) => { |
||||
const { finish, jumpStep } = props |
const { finish, t } = props |
||||
return ( |
return ( |
||||
<Box sticky alignItems="center" justifyContent="center"> |
<Box sticky alignItems="center" justifyContent="center"> |
||||
<Box align="center"> |
<Box align="center" alignItems="center"> |
||||
<Title>This is ENJOY THE APP screen. 1 line is the maximum</Title> |
<Box color="positiveGreen"> |
||||
<Description> |
<IconCheckCircle size={44} /> |
||||
This is a long text, please replace it with the final wording once it’s done. |
</Box> |
||||
<br /> |
<Box style={{ paddingTop: '20px', maxWidth: 536 }} align="center" mb={5}> |
||||
Lorem ipsum dolor amet ledger lorem dolor ipsum amet |
<Title>{t('onboarding:finish.title')}</Title> |
||||
</Description> |
<Description>{t('onboarding:finish.desc')}</Description> |
||||
<IconFinishOnboarding size={136} /> |
</Box> |
||||
<Button small primary onClick={() => finish()}> |
<Button primary onClick={() => finish()}> |
||||
Open App |
{t('onboarding:finish.openAppButton')} |
||||
</Button> |
</Button> |
||||
<Box onClick={() => jumpStep('start')} style={{ padding: 15 }}> |
<Box alignItems="center" mt={7}> |
||||
<Text color="smoke">I want to go back to Onboarding</Text> |
<FollowUsDesc>{t('onboarding:finish.followUsLabel')}</FollowUsDesc> |
||||
|
</Box> |
||||
|
<Box horizontal flow={5} color="grey"> |
||||
|
{socialMedia.map(socMed => <SocialMediaBox key={socMed.key} socMed={socMed} />)} |
||||
</Box> |
</Box> |
||||
</Box> |
</Box> |
||||
</Box> |
</Box> |
||||
) |
) |
||||
} |
} |
||||
|
|
||||
|
type SocMed = { |
||||
|
icon: any, |
||||
|
url: string, |
||||
|
onClick: string => void, |
||||
|
} |
||||
|
|
||||
|
export function SocialMediaBox({ socMed }: { socMed: SocMed }) { |
||||
|
const { icon, url, onClick } = socMed |
||||
|
return ( |
||||
|
<Box |
||||
|
horizontal |
||||
|
style={{ |
||||
|
cursor: 'pointer', |
||||
|
}} |
||||
|
onClick={() => onClick(url)} |
||||
|
> |
||||
|
{icon} |
||||
|
</Box> |
||||
|
) |
||||
|
} |
||||
|
|
||||
|
export const FollowUsDesc = styled(Box).attrs({ |
||||
|
ff: 'Museo Sans|Regular', |
||||
|
fontSize: 4, |
||||
|
textAlign: 'center', |
||||
|
color: 'grey', |
||||
|
})` |
||||
|
margin: 10px auto; |
||||
|
` |
||||
|
Loading…
Reference in new issue