1 import { Fragment } from 'react';
3 import type { IconName } from 'packages/icons';
4 import { c } from 'ttag';
6 import { Button } from '@proton/atoms/index';
7 import { Icon } from '@proton/components/index';
9 import { Container } from '../Container';
10 import type { OnboardingProps } from '../interface';
12 import './PendingInvitationStep.scss';
14 export const PendingInvitationStep = () => {
15 const steps: { icon: IconName; text: string; isDone: boolean }[] = [
18 text: c('Onboarding Info').t`Invitation received`,
22 icon: 'envelope-open',
23 text: c('Onboarding Info').t`Invitation accepted`,
28 text: c('Onboarding Info').t`Final approval pending`,
35 title={c('Onboarding Info').t`Final approval in progress`}
36 subtitle={c('Onboarding Info').t`Hang tight`}
38 <div className="flex flex-column justify-center ratio-square w-full p-8">
39 {steps.map(({ icon, text, isDone }, index) => {
40 const isLastStep = index === steps.length - 1;
44 <div className={'rounded bg-weak p-4 text-xl flex items-center justify-space-between'}>
45 <div className="flex items-center gap-2">
46 <Icon name={icon} size={6} />
51 className={isDone ? 'color-success' : 'color-warning'}
52 name={isDone ? 'checkmark-circle-filled' : 'clock-circle-filled'}
55 {!isLastStep && <div className="steps-line p-4 ml-8" />}
63 {c('Onboarding Info').t`The owner needs to confirm sharing access. You'll get an email once it's done.`}
69 export const PendingInvitationStepButtons = ({ onNext }: OnboardingProps) => {
71 <div className="w-full flex justify-end">
72 <Button size="large" color="norm" onClick={onNext}>
73 {c('Onboarding Action').t`Continue`}