aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/PM.js
blob: 1833f3a3f2319f2d83cdd1edcdfe8f62559f4c24 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import React from 'react';

import Avatar from './Avatar';
import { format } from '../utils/embed';

export default function PM(props) {
    const { chat } = props;
    return (
        <li style={chatItemStyle}>
            <Avatar user={chat.user} />
            <p dangerouslySetInnerHTML={{ __html: format(chat.body) }} />
        </li>
    );
}

const chatItemStyle = {
    padding: '5px 13px',
    fontSize: '14px',
    listStyle: 'none',
    margin: '10px 0',
    boxShadow: '0 0 3px rgba(0,0,0, 0.16)'
}