Skip to content

Instantly share code, notes, and snippets.

@rohanBagchi
Created February 26, 2018 07:00
Show Gist options
  • Select an option

  • Save rohanBagchi/e9412b3eb844f6f7b2b27cff53b3d898 to your computer and use it in GitHub Desktop.

Select an option

Save rohanBagchi/e9412b3eb844f6f7b2b27cff53b3d898 to your computer and use it in GitHub Desktop.
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