import React, { useMemo } from 'react'; import { Typography } from '@mui/material'; import { ChatMessageBalloonProps } from '../../interfaces'; import * as S from './ChatMessageBalloon.style' export const ChatMessageBalloon: React.FC = ({ label, description, date, direction, children, className, bottomChildren, onMouseEnter, onMouseLeave, onRowMouseEnter, onRowMouseLeave, highlight, ...rest }) => { const ballonClassNames = useMemo(() => { const classNames = [] if(!!onMouseEnter) classNames.push('is-interactive') if(!!highlight) classNames.push('is-highlight') return classNames.join(" ") }, [highlight, onMouseEnter]) return ( {label} {description} {children} {date} {bottomChildren} ); };