闭社主体 forked from https://github.com/tootsuite/mastodon
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
712 B

  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. export default class AvatarOverlay extends React.PureComponent {
  4. static propTypes = {
  5. staticSrc: PropTypes.string.isRequired,
  6. overlaySrc: PropTypes.string.isRequired,
  7. };
  8. render() {
  9. const { staticSrc, overlaySrc } = this.props;
  10. const baseStyle = {
  11. backgroundImage: `url(${staticSrc})`,
  12. };
  13. const overlayStyle = {
  14. backgroundImage: `url(${overlaySrc})`,
  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. }