Web: Files: TableView: use avatar in author cell
This commit is contained in:
parent
f05dadf17c
commit
adb8e4e680
@ -1,12 +1,14 @@
|
||||
import React from "react";
|
||||
import { StyledText, StyledAuthorAvatar } from "./CellStyles";
|
||||
import { StyledText, StyledAuthorCell } from "./CellStyles";
|
||||
import Avatar from "@appserver/components/avatar";
|
||||
|
||||
const AuthorCell = ({ fileOwner, sideColor, item }) => {
|
||||
return (
|
||||
<>
|
||||
<StyledAuthorAvatar
|
||||
src={item.createdBy.avatarSmall}
|
||||
<StyledAuthorCell>
|
||||
<Avatar
|
||||
source={item.createdBy.avatarSmall}
|
||||
className="author-avatar-cell"
|
||||
role="user"
|
||||
/>
|
||||
<StyledText
|
||||
color={sideColor}
|
||||
@ -17,7 +19,7 @@ const AuthorCell = ({ fileOwner, sideColor, item }) => {
|
||||
>
|
||||
{fileOwner}
|
||||
</StyledText>
|
||||
</>
|
||||
</StyledAuthorCell>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -6,11 +6,14 @@ const StyledText = styled(Text)`
|
||||
margin-right: 12px;
|
||||
`;
|
||||
|
||||
const StyledAuthorAvatar = styled.img`
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 8px;
|
||||
border-radius: 20px;
|
||||
const StyledAuthorCell = styled.div`
|
||||
display: flex;
|
||||
|
||||
.author-avatar-cell {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
`;
|
||||
|
||||
export { StyledText, StyledAuthorAvatar };
|
||||
export { StyledText, StyledAuthorCell };
|
||||
|
Loading…
Reference in New Issue
Block a user