Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Commit

Permalink
Avatar 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Wiktor Petryszyn committed Apr 20, 2023
1 parent 668d5b1 commit dd19b0c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/atoms/Avatar2/Avatar.module.scss
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));
}
20 changes: 20 additions & 0 deletions src/components/atoms/Avatar2/Avatar.tsx
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)}/>
}
</>
)
}

0 comments on commit dd19b0c

Please sign in to comment.