NastiaS
7 years ago
12 changed files with 447 additions and 160 deletions
@ -1,102 +0,0 @@ |
|||
// @flow
|
|||
|
|||
import React from 'react' |
|||
|
|||
import Box from 'components/base/Box' |
|||
import Button from 'components/base/Button' |
|||
import styled from 'styled-components' |
|||
|
|||
import IconSelectPIN from 'icons/onboarding/SelectPIN' |
|||
import { Title, Description, OnboardingFooter, Inner } from '../helperComponents' |
|||
|
|||
import type { StepProps } from '..' |
|||
|
|||
export const IconSelectStep = styled(Box).attrs({ |
|||
width: 26, |
|||
height: 26, |
|||
textAlign: 'center', |
|||
})` |
|||
border-radius: 100%; |
|||
background: #6490f126; |
|||
` |
|||
|
|||
export default (props: StepProps) => { |
|||
const { nextStep, prevStep, t } = props |
|||
const steps = [ |
|||
{ |
|||
key: 'step1', |
|||
icon: <IconSelectStep>1</IconSelectStep>, |
|||
desc: t('onboarding:selectPIN.instructions.step1'), |
|||
}, |
|||
{ |
|||
key: 'step2', |
|||
icon: <IconSelectStep>2</IconSelectStep>, |
|||
desc: t('onboarding:selectPIN.instructions.step2'), |
|||
}, |
|||
{ |
|||
key: 'step3', |
|||
icon: <IconSelectStep>3</IconSelectStep>, |
|||
desc: t('onboarding:selectPIN.instructions.step3'), |
|||
}, |
|||
{ |
|||
key: 'step4', |
|||
icon: <IconSelectStep>4</IconSelectStep>, |
|||
desc: t('onboarding:selectPIN.instructions.step4'), |
|||
}, |
|||
] |
|||
return ( |
|||
<Box sticky> |
|||
<Box grow alignItems="center" justifyContent="center"> |
|||
<Box align="center" mb={5}> |
|||
<Title>{t('onboarding:selectPIN.title')}</Title> |
|||
<Description>{t('onboarding:selectPIN.desc')}</Description> |
|||
</Box> |
|||
<Box> |
|||
<Inner style={{ width: 760 }}> |
|||
<Box style={{ width: 260 }} mt={5}> |
|||
<IconSelectPIN /> |
|||
</Box> |
|||
|
|||
<Box shrink grow flow={5}> |
|||
{steps.map(step => <SelectPINStep key={step.key} step={step} />)} |
|||
</Box> |
|||
</Inner> |
|||
</Box> |
|||
</Box> |
|||
<OnboardingFooter horizontal align="center" flow={2}> |
|||
<Button small outline onClick={() => prevStep()}> |
|||
Go Back |
|||
</Button> |
|||
<Button small primary onClick={() => nextStep()} ml="auto"> |
|||
Continue |
|||
</Button> |
|||
</OnboardingFooter> |
|||
</Box> |
|||
) |
|||
} |
|||
|
|||
type StepType = { |
|||
icon: any, |
|||
desc: string, |
|||
} |
|||
export function SelectPINStep({ step }: { step: StepType }) { |
|||
const { icon, desc } = step |
|||
return ( |
|||
<Box horizontal> |
|||
<Box justify="center" color="grey" style={{ width: 26 }}> |
|||
{icon} |
|||
</Box> |
|||
<Box ff="Open Sans|Regular" justify="center" fontSize={4} style={{ paddingLeft: 10 }} shrink> |
|||
<CardDescription>{desc}</CardDescription> |
|||
</Box> |
|||
</Box> |
|||
) |
|||
} |
|||
|
|||
export const CardDescription = styled(Box).attrs({ |
|||
ff: 'Open Sans|Regular', |
|||
fontSize: 4, |
|||
textAlign: 'left', |
|||
color: 'smoke', |
|||
shrink: 1, |
|||
})`` |
@ -0,0 +1,72 @@ |
|||
// @flow
|
|||
|
|||
import React from 'react' |
|||
|
|||
import Box from 'components/base/Box' |
|||
|
|||
import IconSelectPIN from 'icons/onboarding/SelectPIN' |
|||
import { |
|||
Title, |
|||
Description, |
|||
Inner, |
|||
InstructionStep, |
|||
IconInstructionStep, |
|||
} from '../helperComponents' |
|||
import OnboardingFooter from '../OnboardingFooter' |
|||
|
|||
import type { StepProps } from '..' |
|||
|
|||
export default (props: StepProps) => { |
|||
const { nextStep, prevStep, t } = props |
|||
const steps = [ |
|||
{ |
|||
key: 'step1', |
|||
icon: <IconInstructionStep>1</IconInstructionStep>, |
|||
desc: t('onboarding:selectPIN.instructions.step1'), |
|||
}, |
|||
{ |
|||
key: 'step2', |
|||
icon: <IconInstructionStep>2</IconInstructionStep>, |
|||
desc: t('onboarding:selectPIN.instructions.step2'), |
|||
}, |
|||
{ |
|||
key: 'step3', |
|||
icon: <IconInstructionStep>3</IconInstructionStep>, |
|||
desc: t('onboarding:selectPIN.instructions.step3'), |
|||
}, |
|||
{ |
|||
key: 'step4', |
|||
icon: <IconInstructionStep>4</IconInstructionStep>, |
|||
desc: t('onboarding:selectPIN.instructions.step4'), |
|||
}, |
|||
] |
|||
return ( |
|||
<Box sticky> |
|||
<Box grow alignItems="center" justifyContent="center"> |
|||
<Box align="center" mb={5}> |
|||
<Title>{t('onboarding:selectPIN.title')}</Title> |
|||
<Description style={{ maxWidth: 714 }}>{t('onboarding:selectPIN.desc')}</Description> |
|||
</Box> |
|||
<Box> |
|||
<Inner style={{ width: 760 }}> |
|||
<Box style={{ width: 260 }} mt={5}> |
|||
<IconSelectPIN /> |
|||
</Box> |
|||
|
|||
<Box shrink grow flow={5}> |
|||
{steps.map(step => <InstructionStep key={step.key} step={step} />)} |
|||
</Box> |
|||
</Inner> |
|||
</Box> |
|||
</Box> |
|||
<OnboardingFooter |
|||
horizontal |
|||
align="center" |
|||
flow={2} |
|||
t={t} |
|||
nextStep={nextStep} |
|||
prevStep={prevStep} |
|||
/> |
|||
</Box> |
|||
) |
|||
} |
@ -0,0 +1,197 @@ |
|||
// @flow
|
|||
|
|||
import React from 'react' |
|||
|
|||
export default () => ( |
|||
<svg width="157" height="144"> |
|||
<defs> |
|||
<rect id="b" width="42" height="10" y="45" rx="2" /> |
|||
<filter |
|||
id="a" |
|||
width="123.8%" |
|||
height="200%" |
|||
x="-11.9%" |
|||
y="-40%" |
|||
filterUnits="objectBoundingBox" |
|||
> |
|||
<feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1" /> |
|||
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="1.5" /> |
|||
<feColorMatrix |
|||
in="shadowBlurOuter1" |
|||
values="0 0 0 0 0.847058824 0 0 0 0 0.847058824 0 0 0 0 0.847058824 0 0 0 1 0" |
|||
/> |
|||
</filter> |
|||
<rect id="d" width="42" height="10" x="67" y="35" rx="2" /> |
|||
<filter |
|||
id="c" |
|||
width="123.8%" |
|||
height="200%" |
|||
x="-11.9%" |
|||
y="-40%" |
|||
filterUnits="objectBoundingBox" |
|||
> |
|||
<feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1" /> |
|||
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="1.5" /> |
|||
<feColorMatrix |
|||
in="shadowBlurOuter1" |
|||
values="0 0 0 0 0.847058824 0 0 0 0 0.847058824 0 0 0 0 0.847058824 0 0 0 1 0" |
|||
/> |
|||
</filter> |
|||
<rect id="f" width="42" height="10" x="31" y="11" rx="2" /> |
|||
<filter |
|||
id="e" |
|||
width="123.8%" |
|||
height="200%" |
|||
x="-11.9%" |
|||
y="-40%" |
|||
filterUnits="objectBoundingBox" |
|||
> |
|||
<feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1" /> |
|||
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="1.5" /> |
|||
<feColorMatrix |
|||
in="shadowBlurOuter1" |
|||
values="0 0 0 0 0.847058824 0 0 0 0 0.847058824 0 0 0 0 0.847058824 0 0 0 1 0" |
|||
/> |
|||
</filter> |
|||
<rect id="h" width="42" height="10" x="103" rx="2" /> |
|||
<filter |
|||
id="g" |
|||
width="123.8%" |
|||
height="200%" |
|||
x="-11.9%" |
|||
y="-40%" |
|||
filterUnits="objectBoundingBox" |
|||
> |
|||
<feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1" /> |
|||
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="1.5" /> |
|||
<feColorMatrix |
|||
in="shadowBlurOuter1" |
|||
values="0 0 0 0 0.847058824 0 0 0 0 0.847058824 0 0 0 0 0.847058824 0 0 0 1 0" |
|||
/> |
|||
</filter> |
|||
<rect id="j" width="42" height="10" x="104" y="55" rx="2" /> |
|||
<filter |
|||
id="i" |
|||
width="123.8%" |
|||
height="200%" |
|||
x="-11.9%" |
|||
y="-40%" |
|||
filterUnits="objectBoundingBox" |
|||
> |
|||
<feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1" /> |
|||
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="1.5" /> |
|||
<feColorMatrix |
|||
in="shadowBlurOuter1" |
|||
values="0 0 0 0 0.847058824 0 0 0 0 0.847058824 0 0 0 0 0.847058824 0 0 0 1 0" |
|||
/> |
|||
</filter> |
|||
<rect id="l" width="42" height="10" x="31" y="67" rx="2" /> |
|||
<filter |
|||
id="k" |
|||
width="123.8%" |
|||
height="200%" |
|||
x="-11.9%" |
|||
y="-40%" |
|||
filterUnits="objectBoundingBox" |
|||
> |
|||
<feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1" /> |
|||
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="1.5" /> |
|||
<feColorMatrix |
|||
in="shadowBlurOuter1" |
|||
values="0 0 0 0 0.847058824 0 0 0 0 0.847058824 0 0 0 0 0.847058824 0 0 0 1 0" |
|||
/> |
|||
</filter> |
|||
<rect id="n" width="42" height="10" x="11" y="96" rx="2" /> |
|||
<filter |
|||
id="m" |
|||
width="123.8%" |
|||
height="200%" |
|||
x="-11.9%" |
|||
y="-40%" |
|||
filterUnits="objectBoundingBox" |
|||
> |
|||
<feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1" /> |
|||
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="1.5" /> |
|||
<feColorMatrix |
|||
in="shadowBlurOuter1" |
|||
values="0 0 0 0 0.847058824 0 0 0 0 0.847058824 0 0 0 0 0.847058824 0 0 0 1 0" |
|||
/> |
|||
</filter> |
|||
<rect id="p" width="42" height="10" x="109" y="103" rx="2" /> |
|||
<filter |
|||
id="o" |
|||
width="123.8%" |
|||
height="200%" |
|||
x="-11.9%" |
|||
y="-40%" |
|||
filterUnits="objectBoundingBox" |
|||
> |
|||
<feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1" /> |
|||
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="1.5" /> |
|||
<feColorMatrix |
|||
in="shadowBlurOuter1" |
|||
values="0 0 0 0 0.847058824 0 0 0 0 0.847058824 0 0 0 0 0.847058824 0 0 0 1 0" |
|||
/> |
|||
</filter> |
|||
<rect id="r" width="42" height="10" x="78" y="83" rx="2" /> |
|||
<filter |
|||
id="q" |
|||
width="123.8%" |
|||
height="200%" |
|||
x="-11.9%" |
|||
y="-40%" |
|||
filterUnits="objectBoundingBox" |
|||
> |
|||
<feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1" /> |
|||
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="1.5" /> |
|||
<feColorMatrix |
|||
in="shadowBlurOuter1" |
|||
values="0 0 0 0 0.847058824 0 0 0 0 0.847058824 0 0 0 0 0.847058824 0 0 0 1 0" |
|||
/> |
|||
</filter> |
|||
</defs> |
|||
<g fill="none" fillRule="evenodd" transform="translate(3 2)"> |
|||
<circle |
|||
cx="79" |
|||
cy="72" |
|||
r="57" |
|||
fill="#6490F1" |
|||
fillOpacity=".1" |
|||
stroke="#142533" |
|||
strokeWidth="2" |
|||
/> |
|||
<path |
|||
fill="#6490F1" |
|||
fillRule="nonzero" |
|||
stroke="#142533" |
|||
d="M88.63 118.285h-1.07v-6.596c0-4.791-3.846-8.689-8.574-8.689s-8.574 3.898-8.574 8.69v6.595H69.34c-1.844 0-3.339 1.515-3.339 3.384v15.695c0 1.869 1.495 3.384 3.339 3.384h19.292c1.843 0 3.339-1.515 3.339-3.384V121.67c0-1.87-1.495-3.384-3.34-3.384zm-15.22-6.596c0-3.115 2.502-5.649 5.576-5.649 3.072 0 5.573 2.534 5.573 5.65v6.595H73.41v-6.596z" |
|||
/> |
|||
<path |
|||
fill="#FFF" |
|||
d="M80.694 129.345v4.225a1.72 1.72 0 0 1-1.709 1.73 1.72 1.72 0 0 1-1.708-1.73v-4.225a3.08 3.08 0 0 1-1.325-2.54c0-1.698 1.358-3.074 3.033-3.074 1.675 0 3.033 1.377 3.033 3.075a3.083 3.083 0 0 1-1.325 2.54z" |
|||
/> |
|||
<use fill="#000" filter="url(#a)" xlinkHref="#b" /> |
|||
<use fill="#FFF" xlinkHref="#b" /> |
|||
<use fill="#000" filter="url(#c)" xlinkHref="#d" /> |
|||
<use fill="#FFF" xlinkHref="#d" /> |
|||
<use fill="#000" filter="url(#e)" xlinkHref="#f" /> |
|||
<use fill="#FFF" xlinkHref="#f" /> |
|||
<use fill="#000" filter="url(#g)" xlinkHref="#h" /> |
|||
<use fill="#FFF" xlinkHref="#h" /> |
|||
<use fill="#000" filter="url(#i)" xlinkHref="#j" /> |
|||
<use fill="#FFF" xlinkHref="#j" /> |
|||
<use fill="#000" filter="url(#k)" xlinkHref="#l" /> |
|||
<use fill="#FFF" xlinkHref="#l" /> |
|||
<use fill="#000" filter="url(#m)" xlinkHref="#n" /> |
|||
<use fill="#FFF" xlinkHref="#n" /> |
|||
<g> |
|||
<use fill="#000" filter="url(#o)" xlinkHref="#p" /> |
|||
<use fill="#FFF" xlinkHref="#p" /> |
|||
</g> |
|||
<g> |
|||
<use fill="#000" filter="url(#q)" xlinkHref="#r" /> |
|||
<use fill="#FFF" xlinkHref="#r" /> |
|||
</g> |
|||
</g> |
|||
</svg> |
|||
) |
Loading…
Reference in new issue