mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-27 02:51:57 +02:00
* Remove focused style from the stepper * Reduce spacing between password input and password policy * Make input validation icon larger * Make animated-tick.svg faster * Move notification to below h1 * Move notification to below h1 * Fix: Warning: Invalid DOM property `autocomplete`. Did you mean `autoComplete`? * Wrap form-text in a span so it's displayed correctly and not altered by flex * Remove "Please request a new password reset email and follow the link." text after the email is entered * Remove (unnecessary?) flex property on .ciam-form-text-icon * Rename `messageTextNode` to `messageTextSpan` * Revert changes to input-validator.ts GitOrigin-RevId: ad83c92a59b9dbc872cf4e49362b0baec9fb5b93
35 lines
755 B
TypeScript
35 lines
755 B
TypeScript
import classNames from 'classnames'
|
|
import { useTranslation } from 'react-i18next'
|
|
|
|
export function CiamStepper({
|
|
steps,
|
|
active,
|
|
}: {
|
|
steps: number
|
|
active: number
|
|
}) {
|
|
const { t } = useTranslation()
|
|
return (
|
|
<div className="ciam-stepper-container">
|
|
<div
|
|
className="ciam-stepper"
|
|
role="progressbar"
|
|
aria-label={t('progress_bar_percentage')}
|
|
aria-valuenow={active + 1}
|
|
aria-valuemax={steps}
|
|
>
|
|
{Array.from({ length: steps }).map((_, i) => (
|
|
<div
|
|
key={i}
|
|
className={classNames({
|
|
step: true,
|
|
active: i === active,
|
|
completed: i < active,
|
|
})}
|
|
/>
|
|
))}
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|