diff options
Diffstat (limited to 'app/assets/javascripts/components/components/avatar.jsx')
-rw-r--r-- | app/assets/javascripts/components/components/avatar.jsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/assets/javascripts/components/components/avatar.jsx b/app/assets/javascripts/components/components/avatar.jsx index abbef72f8..6177683ba 100644 --- a/app/assets/javascripts/components/components/avatar.jsx +++ b/app/assets/javascripts/components/components/avatar.jsx @@ -3,15 +3,16 @@ import PureRenderMixin from 'react-addons-pure-render-mixin'; const Avatar = React.createClass({ propTypes: { - src: React.PropTypes.string.isRequired + src: React.PropTypes.string.isRequired, + size: React.PropTypes.number.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 style={{ width: `${this.props.size}px`, height: `${this.props.size}px` }}> + <img src={this.props.src} width={this.props.size} height={this.props.size} alt='' style={{ display: 'block', borderRadius: '4px' }} /> </div> ); } |