1 import type { FC } from 'react';
3 import type { IconName, IconSize } from '@proton/components';
4 import { Icon } from '@proton/components';
5 import { VaultColor } from '@proton/pass/types/protobuf/vault-v1';
6 import clsx from '@proton/utils/clsx';
8 import { VAULT_COLOR_MAP } from './constants';
10 import './VaultTag.scss';
21 export const VaultTag: FC<Props> = ({ title, shared = false, icon, color, count, iconSize = 3 }) => {
25 'pass-vault-tag flex items-center text-sm gap-x-1 flex-nowrap lh100',
26 shared && 'pass-vault-tag--shared'
28 style={shared ? { '--vault-icon-color': `rgb(${VAULT_COLOR_MAP[color ?? VaultColor.COLOR1]})` } : undefined}
30 {<Icon className="shrink-0 mr-1" name={icon} size={iconSize} />}
31 <span className="text-ellipsis">{title}</span>
34 <span className="shrink-0">• {count}</span>
35 <Icon className="shrink-0" name="users" size={iconSize} />