1 import Icon from '@proton/components/components/icon/Icon';
2 import clsx from '@proton/utils/clsx';
4 import type { IconName, IconProps } from '../../components/icon/Icon';
6 interface Props extends Omit<IconProps, 'name' | 'size'> {
7 type: 'info' | 'success' | 'warning' | 'danger';
10 const RecoveryStatusIcon = ({ type, className, ...rest }: Props) => {
11 let config: { name: IconName; className: string } = {
12 name: 'info-circle-filled',
13 className: 'color-info',
16 if (type === 'success') {
18 name: 'checkmark-circle-filled',
19 className: 'color-success',
23 if (type === 'warning') {
25 name: 'exclamation-circle-filled',
26 className: 'color-warning',
30 if (type === 'danger') {
32 name: 'exclamation-circle-filled',
33 className: 'color-danger',
37 return <Icon className={clsx([config.className, className])} name={config.name} size={4.5} {...rest} />;
40 export default RecoveryStatusIcon;