0
0
Fork 0

Add new onboarding flow to web UI (#24619)

This commit is contained in:
Eugen Rochko 2023-04-23 22:24:53 +02:00 committed by GitHub
parent 9d75b03ba4
commit 0461f83320
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 1019 additions and 357 deletions

View file

@ -0,0 +1,25 @@
import React from 'react';
import PropTypes from 'prop-types';
import Check from 'mastodon/components/check';
import classNames from 'classnames';
const ProgressIndicator = ({ steps, completed }) => (
<div className='onboarding__progress-indicator'>
{(new Array(steps)).fill().map((_, i) => (
<React.Fragment key={i}>
{i > 0 && <div className={classNames('onboarding__progress-indicator__line', { active: completed > i })} />}
<div className={classNames('onboarding__progress-indicator__step', { active: completed > i })}>
{completed > i && <Check />}
</div>
</React.Fragment>
))}
</div>
);
ProgressIndicator.propTypes = {
steps: PropTypes.number.isRequired,
completed: PropTypes.number,
};
export default ProgressIndicator;