You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
772 B

  1. import React from 'react';
  2. import ImmutablePropTypes from 'react-immutable-proptypes';
  3. export default class AvatarOverlay extends React.PureComponent {
  4. static propTypes = {
  5. account: ImmutablePropTypes.map.isRequired,
  6. friend: ImmutablePropTypes.map.isRequired,
  7. };
  8. render() {
  9. const { account, friend } = this.props;
  10. const baseStyle = {
  11. backgroundImage: `url(${account.get('avatar_static')})`,
  12. };
  13. const overlayStyle = {
  14. backgroundImage: `url(${friend.get('avatar_static')})`,
  15. };
  16. return (
  17. <div className='account__avatar-overlay'>
  18. <div className='account__avatar-overlay-base' style={baseStyle} />
  19. <div className='account__avatar-overlay-overlay' style={overlayStyle} />
  20. </div>
  21. );
  22. }
  23. }