1 import { memo } from 'react';
3 import { c } from 'ttag';
5 import { Button } from '@proton/atoms';
6 import { Icon, Tooltip } from '@proton/components';
7 import clsx from '@proton/utils/clsx';
15 export const Header = memo(({ onBack, currentStep, maxSteps }: Props) => {
17 <div className="relative p-4">
19 <Tooltip title={c('Action').t`Go back`}>
20 <Button className="shrink-0 absolute top-0 left-0" icon shape="ghost" onClick={onBack}>
21 <Icon name="arrow-left" alt={c('Action').t`Go back`} />
26 <div className="flex align-center justify-center gap-2">
27 {[...Array(maxSteps).keys()].map((i) => {
31 className={clsx([i == currentStep ? 'bg-primary' : 'bg-strong', 'pr-8 h-2 rounded-full'])}
40 Header.displayName = 'OnboardingHeader';