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.

26 lines
842 B

  1. import ImmutablePropTypes from 'react-immutable-proptypes';
  2. import PureRenderMixin from 'react-addons-pure-render-mixin';
  3. const DisplayName = React.createClass({
  4. propTypes: {
  5. account: ImmutablePropTypes.map.isRequired
  6. },
  7. mixins: [PureRenderMixin],
  8. render () {
  9. var displayName = this.props.account.get('display_name', this.props.account.get('username'));
  10. var acct = this.props.account.get('acct');
  11. var url = this.props.account.get('url');
  12. return (
  13. <a href={url} style={{ display: 'inline-block', color: '#616b86', textDecoration: 'none', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', width: '190px' }}>
  14. <strong style={{ fontWeight: 'bold', color: '#fff' }}>{displayName}</strong> <span>{acct}</span>
  15. </a>
  16. );
  17. }
  18. });
  19. export default DisplayName;