1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-04 23:14:56 +01:00
metamask-extension/ui/components/app/step-progress-bar/step-progress-bar.js
Alex Donesky 0ca0f1784e
Add recovery-phrase views for new onboarding flow (#11434)
* add recovery-phrase views for new onboarding flow

* black => ui-black

* minor syntax improvement
2021-07-07 19:10:12 -05:00

51 lines
1.2 KiB
JavaScript

import React from 'react';
import classnames from 'classnames';
import PropTypes from 'prop-types';
import { useI18nContext } from '../../../hooks/useI18nContext';
import Box from '../../ui/box';
const stages = {
PASSWORD_CREATE: 1,
SEED_PHRASE_VIDEO: 2,
SEED_PHRASE_REVIEW: 3,
SEED_PHRASE_CONFIRM: 4,
ONBOARDING_COMPLETE: 5,
};
export default function StepProgressBar({ stage = 'PASSWORD_CREATE' }) {
const t = useI18nContext();
return (
<Box margin={4}>
<ul className="progressbar">
<li
className={classnames({
active: stages[stage] >= 1,
complete: stages[stage] >= 1,
})}
>
{t('createPassword')}
</li>
<li
className={classnames({
active: stages[stage] >= 2,
complete: stages[stage] >= 3,
})}
>
{t('secureWallet')}
</li>
<li
className={classnames({
active: stages[stage] >= 4,
complete: stages[stage] >= 5,
})}
>
{t('confirmSeedPhrase')}
</li>
</ul>
</Box>
);
}
StepProgressBar.propTypes = {
stage: PropTypes.string,
};