Fixed collaborator avatars

This commit is contained in:
Jori Lallo
2017-09-10 23:14:32 -07:00
parent 9aa49deeeb
commit d73f2e856e

View File

@ -25,15 +25,20 @@ const Collaborators = function({ document }: { document: Document }) {
return ( return (
<Avatars> <Avatars>
<Tooltip tooltip={tooltip} placement="bottom"> <StyledTooltip tooltip={tooltip} placement="bottom">
{collaborators.map(user => ( {collaborators.map(user => (
<Avatar key={user.id} src={user.avatarUrl} /> <Avatar key={user.id} src={user.avatarUrl} />
))} ))}
</Tooltip> </StyledTooltip>
</Avatars> </Avatars>
); );
}; };
const StyledTooltip = styled(Tooltip)`
display: flex;
flex-direction: row-reverse;
`;
const Avatars = styled(Flex)` const Avatars = styled(Flex)`
flex-direction: row-reverse; flex-direction: row-reverse;
height: 26px; height: 26px;
@ -45,7 +50,7 @@ const Avatar = styled.img`
flex-shrink: 0; flex-shrink: 0;
border-radius: 50%; border-radius: 50%;
border: 2px solid ${color.white}; border: 2px solid ${color.white};
margin-right: -13px; margin-right: -10px;
&:first-child { &:first-child {
margin-right: 0; margin-right: 0;