UNPKG

meses-messaging

Version:

Meses messaging SDK in JavaScript

25 lines (22 loc) 664 B
import React from 'react' import moment from 'moment' import styles from './styles.css' import BalloonHeading from './BalloonHeading' import BalloonBody from './BalloonBody' import TimeLabel from './TimeLabel' class Balloon extends React.Component { constructor() { super() } render() { let { time, message, alignRight, sender } = this.props return ( <div className={ alignRight ? styles.balloonRight : styles.balloon }> <BalloonHeading sender={ alignRight ? '' : sender } /> <BalloonBody time={ time } message={ message } /> <TimeLabel time={ time } format="LT" /> </div> ) } } export default Balloon