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"
This commit is part of merge request !7. Comments created here will be created in the context of that merge request.
...@@ -5,10 +5,12 @@ import { generateRandomLinearGradient } from '../post/Utils'; ...@@ -5,10 +5,12 @@ import { generateRandomLinearGradient } from '../post/Utils';
type AvatarProps ={ type AvatarProps ={
User: User User: User
ShowInitial?: boolean
} }
const Avatar:FC<PropsWithChildren<AvatarProps>> = ({ const Avatar:FC<PropsWithChildren<AvatarProps>> = ({
User User,
ShowInitial = false
}) => { }) => {
return ( return (
...@@ -18,7 +20,7 @@ const Avatar:FC<PropsWithChildren<AvatarProps>> = ({ ...@@ -18,7 +20,7 @@ const Avatar:FC<PropsWithChildren<AvatarProps>> = ({
</div> </div>
} }
{!User.Avatar && {!User.Avatar && ShowInitial &&
<div> <div>
<p>{User.Username[0]}</p> <p>{User.Username[0]}</p>
</div> </div>
......
.avatar { .avatar {
color: white; color: white;
border-radius: 50%; border-radius: 50%;
width: 48px; width: 56px;
height: 48px; height: 56px;
background-color: 'red'; background-color: 'red';
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: 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