1 import clsx from '@proton/utils/clsx';
3 import ReadableDate from './ReadableDate';
4 import { getBreachIcon } from './helpers';
6 interface BreachTitleProps {
18 const BreachTitle = ({ name, createdAt, style, className, inModal = false, severity, resolved }: BreachTitleProps) => {
19 const { iconAltText } = style;
21 const breachIcon = getBreachIcon(severity, { resolved });
24 <span className={clsx('flex flex-nowrap items-start', className)}>
25 <span className={clsx('ratio-square rounded flex w-custom relative')} style={{ '--w-custom': '3rem' }}>
26 <img src={breachIcon} className="m-auto w-full h-full" alt={iconAltText} />
28 <span className="flex-1 text-left pl-2 pr-1">
30 <div className="inline-flex items-center">
31 <span className="block text- mr-1">{name}</span>
34 <div className="flex flex-nowrap items-center">
35 <h3 className="block text-bold">{name}</h3>
40 className={clsx('block m-0 color-weak text-normal', inModal ? 'text-xs' : 'text-sm')}
49 export default BreachTitle;