chinwagsocial/app/assets/javascripts/components/components/display_name.jsx
2016-09-01 14:12:11 +02:00

20 lines
557 B
JavaScript

import ImmutablePropTypes from 'react-immutable-proptypes';
const DisplayName = React.createClass({
propTypes: {
account: ImmutablePropTypes.map.isRequired
},
render () {
return (
<span style={{ display: 'block', maxWidth: '100%', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }}>
<strong style={{ fontWeight: 'bold' }}>{this.props.account.get('display_name')}</strong> <span style={{ fontSize: '14px' }}>@{this.props.account.get('acct')}</span>
</span>
);
}
});
export default DisplayName;