Skip to content
Snippets Groups Projects
Commit 5d03b485 authored by Matt Kirby's avatar Matt Kirby
Browse files

Avatar stylings

parent 76905147
No related branches found
No related tags found
1 merge request!7Resolve "Adding basic post component"
......@@ -5,10 +5,12 @@ import { generateRandomLinearGradient } from '../post/Utils';
type AvatarProps ={
User: User
ShowInitial?: boolean
}
const Avatar:FC<PropsWithChildren<AvatarProps>> = ({
User
User,
ShowInitial = false
}) => {
return (
......@@ -18,7 +20,7 @@ const Avatar:FC<PropsWithChildren<AvatarProps>> = ({
</div>
}
{!User.Avatar &&
{!User.Avatar && ShowInitial &&
<div>
<p>{User.Username[0]}</p>
</div>
......
.avatar {
color: white;
border-radius: 50%;
width: 48px;
height: 48px;
width: 56px;
height: 56px;
background-color: 'red';
display: flex;
justify-content: center;
align-items: center;
margin-right: 8px;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment