Skip to content

Commit

Permalink
feat: add user card component
Browse files Browse the repository at this point in the history
  • Loading branch information
TejasShekar committed Jun 14, 2022
1 parent 47e0d37 commit 05c2857
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/plays/github-user-search/GitHubUserCard.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export const GitHubUserCard = ({username, avatar, link}) => {
return (
<a
href={link}
target="_blank"
rel="noreferrer"
style={{backgroundImage: `url(${avatar})`}}
className=" bg-cover bg-center h-[15rem] w-[15rem] flex rounded-lg"
>
<h1 className="text-2xl p-2 w-full h-full text-white opacity-0 hover:opacity-80 hover:bg-black rounded-lg">
{username}
</h1>
</a>
);
};

0 comments on commit 05c2857

Please sign in to comment.