File size: 1,018 Bytes
452020d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
// RCE CSS
import { MessageList } from 'react-chat-elements';
import 'react-chat-elements/dist/main.css';
const ChatBox = () => {
return (
<div style={{ width: 600 }}>
{/* <MessageBox
position={'left'}
type={'photo'}
text={'react.svg'}
data={{
uri: 'https://facebook.github.io/react/img/logo.svg',
status: {
click: false,
loading: 0,
},
}}
/> */}
<MessageList
// referance={messageListReferance}
className="message-list"
lockable={true}
toBottomHeight={'100%'}
dataSource={[
{
position: 'right',
type: 'text',
text: 'Lorem ipsum dolor sit amet',
date: new Date(),
},
{
position: 'left',
type: 'text',
text: 'Lorem ipsum dolor sit amet',
date: new Date(),
},
]}
/>
</div>
);
};
export default ChatBox;
|