From f470636a70943a8ecad8bddc791a1c2dddd28e1e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 4 May 2019 21:13:12 +0300 Subject: Components -> UI --- vnext/src/components/PM.js | 51 ---------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 vnext/src/components/PM.js (limited to 'vnext/src/components/PM.js') diff --git a/vnext/src/components/PM.js b/vnext/src/components/PM.js deleted file mode 100644 index a1e70ad5..00000000 --- a/vnext/src/components/PM.js +++ /dev/null @@ -1,51 +0,0 @@ -import React from 'react'; - -import { UserType, MessageType } from './Types'; - -import Avatar from './Avatar'; -import { format } from '../utils/embed'; - -function PM(props) { - const { chat } = props; - return ( -
  • -
    - -
    -

    -

    -
    -
  • - ); -} - -export default React.memo(PM); - -function bubbleStyle(me, msg) { - const isMe = me.uid === msg.user.uid; - const color = isMe ? '#fff' : '#222'; - const background = isMe ? '#ec4b98' : '#eee'; - return { - background: background, - color: color, - padding: '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 - }; -} - -PM.propTypes = { - chat: MessageType.isRequired, - visitor: UserType.isRequired -}; -- cgit v1.2.3