Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git] / packages / components / containers / organization / UserIsExternalIcon.tsx
blob89840366be74d2d3d73670755702aa7ae460f25b
1 import { c } from 'ttag';
3 import Icon from '@proton/components/components/icon/Icon';
4 import Tooltip from '@proton/components/components/tooltip/Tooltip';
5 import { GROUP_MEMBER_TYPE } from '@proton/shared/lib/interfaces';
7 // based on the Info component - packages/components/components/link/Info.tsx
8 const UserIsExternalIcon = ({ groupMemberType }: { groupMemberType: GROUP_MEMBER_TYPE }) => {
9     if (groupMemberType === GROUP_MEMBER_TYPE.INTERNAL) {
10         return null;
11     }
13     const messages = {
14         [GROUP_MEMBER_TYPE.INTERNAL_TYPE_EXTERNAL]: c('tooltip')
15             .t`External address - disables end-to-end email encryption for this group`,
16         [GROUP_MEMBER_TYPE.EXTERNAL]: c('tooltip')
17             .t`External address - disables end-to-end email encryption for this group, and no encrypted resources will be shared with this user.`,
18     };
20     const tooltipMessage = messages[groupMemberType];
22     return (
23         <Tooltip title={tooltipMessage} openDelay={0} closeDelay={250} longTapDelay={0} originalPlacement="top">
24             <Icon name="exclamation-circle" className="shrink-0 color-warning" />
25         </Tooltip>
26     );
29 export default UserIsExternalIcon;