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.
31 lines
857 B
31 lines
857 B
8 years ago
|
import React from 'react';
|
||
7 years ago
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||
8 years ago
|
|
||
7 years ago
|
export default class AvatarOverlay extends React.PureComponent {
|
||
8 years ago
|
|
||
8 years ago
|
static propTypes = {
|
||
7 years ago
|
account: ImmutablePropTypes.map.isRequired,
|
||
|
friend: ImmutablePropTypes.map.isRequired,
|
||
8 years ago
|
};
|
||
|
|
||
8 years ago
|
render() {
|
||
7 years ago
|
const { account, friend } = this.props;
|
||
8 years ago
|
|
||
|
const baseStyle = {
|
||
7 years ago
|
backgroundImage: `url(${account.get('avatar_static')})`,
|
||
8 years ago
|
};
|
||
|
|
||
|
const overlayStyle = {
|
||
7 years ago
|
backgroundImage: `url(${friend.get('avatar_static')})`,
|
||
8 years ago
|
};
|
||
|
|
||
|
return (
|
||
|
<div className='account__avatar-overlay'>
|
||
7 years ago
|
<div className='account__avatar-overlay-base' style={baseStyle} data-avatar-of={`@${account.get('acct')}`} />
|
||
|
<div className='account__avatar-overlay-overlay' style={overlayStyle} data-avatar-of={`@${friend.get('acct')}`} />
|
||
8 years ago
|
</div>
|
||
|
);
|
||
|
}
|
||
|
|
||
8 years ago
|
}
|