import { Box, Icon, IconSrc } from 'folds'; import React, { ReactNode } from 'react'; import { CompactLayout, ModernLayout } from '..'; export type EventContentProps = { messageLayout: number; time: ReactNode; iconSrc: IconSrc; content: ReactNode; }; export function EventContent({ messageLayout, time, iconSrc, content }: EventContentProps) { const beforeJSX = ( {messageLayout === 1 && time} ); const msgContentJSX = ( {content} {messageLayout !== 1 && time} ); return messageLayout === 1 ? ( {msgContentJSX} ) : ( {msgContentJSX} ); }