File size: 882 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
import clsx from 'clsx';
import { useTranslate } from 'i18n-calypso';
import { ReactNode } from 'react';
import AIIcon from 'calypso/assets/images/performance-profiler/ai-icon.svg';
import AILoadingIcon from 'calypso/assets/images/performance-profiler/ai-loading-icon.svg';
import './style.scss';
interface LLMMessageProps {
message: string | ReactNode;
secondaryArea?: ReactNode;
rotate?: boolean;
}
export const LLMMessage = ( { message, rotate, secondaryArea }: LLMMessageProps ) => {
const translate = useTranslate();
return (
<div className="performance-profiler-llm-message">
<div className="content">
<img
src={ rotate ? AILoadingIcon : AIIcon }
alt={ translate( 'AI generated content icon' ) }
className={ clsx( { rotate: !! rotate } ) }
/>
<span className="message">{ message }</span>
</div>
{ secondaryArea }
</div>
);
};
|