Blame view
imports/client/components/Avatar.js
744 Bytes
ff976df49
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
// import { Avatar } from '/imports/client/components/Avatar'; import _ from 'lodash'; import React, { Component } from 'react'; import classNames from 'classnames'; export class Avatar extends Component { render() { const user = this.props.user; return ( <div className = {classNames( "avatar-box", this.props.small && "avatar-small" )} style={_.assign({ backgroundImage: `url(${user.getAvatarUrl()})`, width: this.props.size + 'px', height: this.props.size + 'px', }, this.props.style || {})} /> ); }; }; |