Skip to content

Commit

Permalink
feat: add component card barbeiro
Browse files Browse the repository at this point in the history
  • Loading branch information
ialexanderbrito committed Mar 30, 2022
1 parent 1fe33dd commit 1a640b7
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/components/CardBarbeiro/CardBarbeiro.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.card {
display: flex;
width: 327px;
height: 112px;
background: var(--shape);
border-radius: 10px;
margin-top: 12px;
margin-bottom: 12px;
align-items: center;
cursor: pointer;
}

.containerImg {
display: flex;
margin-left: 6px;

img {
width: 72px;
height: 72px;
border-radius: 40px;
}
}

.containerInfo {
display: flex;
margin-left: 12px;
width: 100%;
align-items: center;
justify-content: space-between;
flex-direction: column;

h2 {
margin-top: 0px;
}
}
23 changes: 23 additions & 0 deletions src/components/CardBarbeiro/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { UserMetadata } from 'types/IContext';

import styles from './CardBarbeiro.module.scss';

type Props = {
barbeiro: UserMetadata | undefined;
onClick: () => void;
};

export function CardBarbeiro({ barbeiro, onClick }: Props) {
return (
<div className={styles.card} onClick={onClick} key={barbeiro?.id}>
<div className={styles.containerImg}>
<img src={barbeiro?.avatar_url || barbeiro?.picture} alt={barbeiro?.nome} />
</div>
<div className={styles.containerInfo}>
<h2>{barbeiro?.nome}</h2>
<strong>aaa</strong>
<strong>aaa</strong>
</div>
</div>
);
}

0 comments on commit 1a640b7

Please sign in to comment.