index.js 437 B

1234567891011121314
  1. import React, { Component } from 'react';
  2. import './index.less';
  3. import Assets from '@src/components/Assets';
  4. export default class Avatar extends Component {
  5. render() {
  6. const { className = '', name = '', src = '', size = 'basic', radius = true } = this.props;
  7. return (
  8. <div className={`g-avatar-wrapper ${className} ${size} ${radius ? 'radius' : ''}`}>
  9. <Assets name={name} src={src} />
  10. </div>
  11. );
  12. }
  13. }