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