blob: abbef72f8477595a4328e240ee6fc18124bd9ed5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import PureRenderMixin from 'react-addons-pure-render-mixin';
const Avatar = React.createClass({
propTypes: {
src: React.PropTypes.string.isRequired
},
mixins: [PureRenderMixin],
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;
|