1 import Icon from '@proton/components/components/icon/Icon';
2 import Tooltip from '@proton/components/components/tooltip/Tooltip';
3 import { ProtectionType } from '@proton/shared/lib/authlog';
4 import { PROTON_SENTINEL_NAME } from '@proton/shared/lib/constants';
7 protection?: ProtectionType | null;
8 protectionDesc?: string | null;
12 const ProtectionTooltip = () => {
14 <Tooltip title={PROTON_SENTINEL_NAME} openDelay={0} closeDelay={150} longTapDelay={0}>
15 <Icon className="align-text-bottom color-primary" name="shield-filled" />
20 const ProtectionCell = ({ protection, protectionDesc, isB2B = false }: Props) => {
21 const protectionTooltip = protection ? <ProtectionTooltip /> : null;
22 if (protection === ProtectionType.OK) {
23 return protectionTooltip;
26 <div className={isB2B ? 'flex flex-column' : ''}>
27 <span className="shrink-0 mr-2">{protectionTooltip}</span>
28 <span className={isB2B ? 'max-w-full text-ellipsis' : 'flex-1'}>{protectionDesc || '-'}</span>
33 export default ProtectionCell;