This repository has been archived by the owner on Dec 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Wiktor Petryszyn
committed
Apr 20, 2023
1 parent
668d5b1
commit dd19b0c
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.avatar { | ||
object-fit: cover; | ||
|
||
border-radius: 50%; | ||
filter: drop-shadow(0px 4px 16px rgba(0, 0, 0, 0.1)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from "react"; | ||
import styles from "./Avatar.module.scss" | ||
import ProfilePic from "../../../assets/images/default-profile-pic.svg"; | ||
import cs from "classnames"; | ||
|
||
interface AvatarProps { | ||
url?: string | ||
className?: string | ||
} | ||
|
||
export const Avatar: React.FC<AvatarProps> = ({url, className}) => { | ||
return ( | ||
<> | ||
{url | ||
? <img className={cs(styles.avatar, className)} src={url} /> | ||
: <ProfilePic className={cs(styles.avatar, className)}/> | ||
} | ||
</> | ||
) | ||
} |