import React from 'react'; import Avatar from './Avatar'; import { format } from '../utils/embed'; export default function PM(props) { const { chat } = props; return (
  • ); } function bubbleStyle(me, msg) { const isMe = me.uid === msg.user.uid; const color = isMe ? '#fff' : '#222'; const background = isMe ? '#0076ff' : '#eee'; return { background: background, color: color, padding: '0 12px' } } function chatItemStyle(me, msg) { const isMe = me.uid === msg.user.uid; const alignment = isMe ? 'flex-end' : 'flex-start'; return { padding: '3px 6px', listStyle: 'none', margin: '10px 0', display: 'flex', flexDirection: 'column', alignItems: alignment } }