Skip to content

Commit

Permalink
Merge pull request #460 from EcrituresNumeriques/explicit-props-acqui…
Browse files Browse the repository at this point in the history
…ntances
  • Loading branch information
Thomas Parisot authored Nov 18, 2021
2 parents f0457de + f1a2142 commit 19e3d23
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
5 changes: 4 additions & 1 deletion front/gatsby/src/components/Acquintances.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ function ConnectedAcquintances ({ _id: articleId, activeUser, setNeedReload, can
{!loading && acquintances.length === 0 && <p>No acquintances</p>}
{acquintances.map((acquintance) => (
<div key={`acquintance-${acquintance._id}`} className={styles.acquintance}>
{acquintance.displayName}<br/>({acquintance.email})
<div>
<span>{acquintance.displayName}</span>
<a href={"mailto:" + acquintance.email} className={styles.acquintanceEmail}>{acquintance.email}</a>
</div>
<div className={styles.acquintanceActions}>
<Button onClick={() => sendArticle(acquintance._id)} ><Send/> Send</Button>
<Button onClick={() => shareArticle(acquintance._id)} ><Share/> Share</Button>
Expand Down
23 changes: 10 additions & 13 deletions front/gatsby/src/components/acquintances.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,22 @@
margin-bottom: 1rem;
}

> p {
padding: 0.5rem 1rem;

span {
@extend .primary-button;
float: right;
}
}

> p:nth-child(2n + 1) {
background-color: $extra-background-color;
}

margin-bottom: 1rem;
}

.acquintance {
display: flex;
justify-content: space-between;
padding: 0.75rem 1rem;

&:nth-child(2n) {
background-color: $extra-background-color;
}
}

.acquintanceEmail {
display: block;
font-size: 0.9em;
}

.acquintanceActions {
Expand Down

0 comments on commit 19e3d23

Please sign in to comment.