Web: Files: added an avatar to the author's cell

This commit is contained in:
Nikita Gopienko 2021-07-27 09:57:00 +03:00
parent 4874d783fc
commit d8c8d267c9

View File

@ -1,18 +1,33 @@
import React from "react";
import Text from "@appserver/components/text";
import styled from "styled-components";
const AuthorCell = ({ fileOwner, sideColor }) => {
const StyledAuthorCell = styled.div`
display: flex;
.author-avatar-cell {
width: 16px;
height: 16px;
margin-right: 8px;
border-radius: 20px;
}
`;
const AuthorCell = ({ fileOwner, sideColor, item }) => {
return (
<Text
as="div"
color={sideColor}
fontSize="12px"
fontWeight={400}
title={fileOwner}
truncate={true}
>
{fileOwner}
</Text>
<StyledAuthorCell>
<img src={item.createdBy.avatarSmall} className="author-avatar-cell" />
<Text
as="div"
color={sideColor}
fontSize="12px"
fontWeight={400}
title={fileOwner}
truncate={true}
>
{fileOwner}
</Text>
</StyledAuthorCell>
);
};