mastodon/app/assets/javascripts/components/components/avatar.jsx

22 lines
462 B
React
Raw Normal View History

import PureRenderMixin from 'react-addons-pure-render-mixin';
2016-08-24 19:08:00 +00:00
const Avatar = React.createClass({
propTypes: {
src: React.PropTypes.string.isRequired
},
mixins: [PureRenderMixin],
2016-08-24 19:08:00 +00:00
render () {
return (
<div style={{ width: '48px', height: '48px', flex: '0 0 auto' }}>
<img src={this.props.src} width={48} height={48} alt='' style={{ display: 'block', borderRadius: '4px' }} />
</div>
);
}
});
export default Avatar;