You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.2 KiB

  1. import ImmutablePropTypes from 'react-immutable-proptypes';
  2. import Avatar from './avatar';
  3. import DisplayName from './display_name';
  4. import RelativeTimestamp from './relative_timestamp';
  5. const Status = React.createClass({
  6. propTypes: {
  7. status: ImmutablePropTypes.map.isRequired
  8. },
  9. render () {
  10. var content = { __html: this.props.status.get('content') };
  11. var status = this.props.status;
  12. return (
  13. <div style={{ padding: '8px 10px', display: 'flex', flexDirection: 'row', borderBottom: '1px solid #363c4b' }}>
  14. <Avatar src={status.getIn(['account', 'avatar'])} />
  15. <div style={{ flex: '1 1 auto', marginLeft: '10px' }}>
  16. <div style={{ overflow: 'hidden' }}>
  17. <div style={{ float: 'right' }}>
  18. <a href={status.get('url')} style={{ textDecoration: 'none' }}><RelativeTimestamp timestamp={status.get('created_at')} /></a>
  19. </div>
  20. <DisplayName account={status.get('account')} />
  21. </div>
  22. <div className='status__content' dangerouslySetInnerHTML={content} style={{ fontSize: '14px' }} />
  23. </div>
  24. </div>
  25. );
  26. }
  27. });
  28. export default Status;