1 import type { FC, ReactNode } from 'react';
3 import { Icon, type IconName, type IconProps } from '@proton/components';
4 import clsx from '@proton/utils/clsx';
6 import './CardContent.scss';
8 export type CardContentProps = {
12 icon?: IconName | (() => ReactNode);
13 iconProps?: Partial<IconProps>;
15 subtitleClassname?: string;
17 titleClassname?: string;
20 export const CardContent: FC<CardContentProps> = ({
31 <div className={clsx('pass-card--content flex items-center flex-nowrap w-full gap-4 text-sm', className)}>
32 {typeof icon === 'function' ? icon() : icon && <Icon name={icon} size={5} {...iconProps} />}
33 <div className="flex flex-column flex-nowrap justify-start w-full text-left">
34 <span className={clsx('pass-card-content--title', ellipsis && 'text-ellipsis', titleClassname)}>
38 <span className={clsx('pass-card-content--subtitle', ellipsis && 'text-ellipsis', subtitleClassname)}>
43 {actions && <div className="shrink-0">{actions}</div>}