Created
February 26, 2018 07:00
-
-
Save rohanBagchi/e9412b3eb844f6f7b2b27cff53b3d898 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| export default ChatBubble = props => { | |
| return ( | |
| <div className='wrapper'> | |
| <Header {...props}/> | |
| <div className='body'> | |
| {props.children} | |
| </div> | |
| <Footer {...props}/> | |
| </div> | |
| ); | |
| }; | |
| const Header = props => ( | |
| <div className='header'> | |
| <div className='sentBy'> | |
| {props.sentBy} | |
| </div> | |
| <div className='avatar'> | |
| <image src={props.avatar}/> | |
| </div> | |
| </div> | |
| ); | |
| const Footer = props => ( | |
| <div className='footer'> | |
| <div className='time'> | |
| <icon name='clock'/> | |
| {props.time} | |
| </div> | |
| </div> | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment