From 67dd01ef75d798e298bed7314e5805573c766a4e Mon Sep 17 00:00:00 2001 From: Anastasia Poupeney Date: Wed, 20 Jun 2018 11:58:14 +0200 Subject: [PATCH] wip selectPIN onboarding skeleton for 4 screens, awaiting wording --- .../steps/SelectPIN/SelectPINrestoreBlue.js | 77 +++++++++++++++++++ .../steps/SelectPIN/SelectPINrestoreNano.js | 77 +++++++++++++++++++ .../Onboarding/steps/SelectPIN/index.js | 21 +++-- 3 files changed, 170 insertions(+), 5 deletions(-) create mode 100644 src/components/Onboarding/steps/SelectPIN/SelectPINrestoreBlue.js create mode 100644 src/components/Onboarding/steps/SelectPIN/SelectPINrestoreNano.js diff --git a/src/components/Onboarding/steps/SelectPIN/SelectPINrestoreBlue.js b/src/components/Onboarding/steps/SelectPIN/SelectPINrestoreBlue.js new file mode 100644 index 00000000..d0336cee --- /dev/null +++ b/src/components/Onboarding/steps/SelectPIN/SelectPINrestoreBlue.js @@ -0,0 +1,77 @@ +// @flow +import React, { PureComponent } from 'react' +import { translate } from 'react-i18next' +import { colors } from 'styles/theme' + +import Box from 'components/base/Box' + +import type { T } from 'types/common' +import IconLedgerBlueSelectPIN from 'icons/illustrations/LedgerBlueSelectPIN' + +import IconChevronRight from 'icons/ChevronRight' + +import { IconOptionRow, DisclaimerBox, OptionRow, Inner } from '../../helperComponents' + +type Props = { + t: T, +} + +class SelectPINrestoreBlue extends PureComponent { + render() { + const { t } = this.props + + const stepsLedgerBlue = [ + { + key: 'step1', + icon: {'1.'}, + desc: t('onboarding:selectPIN.instructions.ledgerBlue.step1'), + }, + { + key: 'step2', + icon: {'2.'}, + desc: t('onboarding:selectPIN.instructions.ledgerBlue.step2'), + }, + { + key: 'step3', + icon: {'3.'}, + desc: t('onboarding:selectPIN.instructions.ledgerBlue.step3'), + }, + ] + + const disclaimerNotes = [ + { + key: 'note1', + icon: , + desc: t('onboarding:selectPIN.disclaimer.note1'), + }, + { + key: 'note2', + icon: , + desc: t('onboarding:selectPIN.disclaimer.note2'), + }, + { + key: 'note3', + icon: , + desc: t('onboarding:selectPIN.disclaimer.note3'), + }, + ] + + return ( + + + + + + + + {stepsLedgerBlue.map(step => )} + + + + + + ) + } +} + +export default translate()(SelectPINrestoreBlue) diff --git a/src/components/Onboarding/steps/SelectPIN/SelectPINrestoreNano.js b/src/components/Onboarding/steps/SelectPIN/SelectPINrestoreNano.js new file mode 100644 index 00000000..e384e2b6 --- /dev/null +++ b/src/components/Onboarding/steps/SelectPIN/SelectPINrestoreNano.js @@ -0,0 +1,77 @@ +// @flow +import React, { PureComponent } from 'react' +import { translate } from 'react-i18next' +import { colors } from 'styles/theme' + +import Box from 'components/base/Box' + +import type { T } from 'types/common' +import IconLedgerNanoSelectPIN from 'icons/illustrations/LedgerNanoSelectPIN' + +import IconChevronRight from 'icons/ChevronRight' + +import { IconOptionRow, DisclaimerBox, OptionRow, Inner } from '../../helperComponents' + +type Props = { + t: T, +} + +class SelectPINrestoreNano extends PureComponent { + render() { + const { t } = this.props + + const stepsLedgerNano = [ + { + key: 'step1', + icon: {'1.'}, + desc: t('onboarding:selectPIN.instructions.ledgerNano.step1'), + }, + { + key: 'step2', + icon: {'2.'}, + desc: t('onboarding:selectPIN.instructions.ledgerNano.step2'), + }, + { + key: 'step3', + icon: {'3.'}, + desc: t('onboarding:selectPIN.instructions.ledgerNano.step3'), + }, + { + key: 'step4', + icon: {'4.'}, + desc: t('onboarding:selectPIN.instructions.ledgerNano.step4'), + }, + ] + const disclaimerNotes = [ + { + key: 'note1', + icon: , + desc: t('onboarding:selectPIN.disclaimer.note1'), + }, + { + key: 'note2', + icon: , + desc: t('onboarding:selectPIN.disclaimer.note2'), + }, + { + key: 'note3', + icon: , + desc: t('onboarding:selectPIN.disclaimer.note3'), + }, + ] + + return ( + + + + + {stepsLedgerNano.map(step => )} + + + + + ) + } +} + +export default translate()(SelectPINrestoreNano) diff --git a/src/components/Onboarding/steps/SelectPIN/index.js b/src/components/Onboarding/steps/SelectPIN/index.js index 11da362c..cbbf6515 100644 --- a/src/components/Onboarding/steps/SelectPIN/index.js +++ b/src/components/Onboarding/steps/SelectPIN/index.js @@ -8,6 +8,8 @@ import { Title, FixedTopContainer } from '../../helperComponents' import OnboardingFooter from '../../OnboardingFooter' import SelectPINnano from './SelectPINnano' import SelectPINblue from './SelectPINblue' +import SelectPINrestoreNano from './SelectPINrestoreNano' +import SelectPINrestoreBlue from './SelectPINrestoreBlue' import type { StepProps } from '../..' @@ -16,12 +18,21 @@ export default (props: StepProps) => { return ( - - {t('onboarding:selectPIN.title')} - - {onboarding.isLedgerNano ? : } + {onboarding.flowType === 'restoreDevice' ? ( + + {t('onboarding:selectPIN.title')} + + {onboarding.isLedgerNano ? : } + - + ) : ( + + {t('onboarding:selectPIN.title')} + + {onboarding.isLedgerNano ? : } + + + )} )