Skip to content

Commit

Permalink
Style Items
Browse files Browse the repository at this point in the history
  • Loading branch information
pmallol committed Apr 28, 2020
1 parent 1678c06 commit 0cb7f04
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/Item.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const Item = (props) => {
<div className={styles.item}>
<Link href="/[id]" as={`/${props.name}`}>
<a>
<img src={props.image} />
<h1>{props.name}</h1>
<div style={{backgroundImage: `url(${props.image})`}} ></div>
<p>{props.name}</p>
</a>
</Link>
</div>
Expand Down
21 changes: 19 additions & 2 deletions components/item.module.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
.item img {
width: 50%;
@import '../styles/variables';

.item {
width: 100%;

div {
background-size: cover;
height: 10rem;
border-radius: 20px;

&:hover {
-webkit-filter: grayscale(100%);
filter: grayscale(100%);
}
}

a:hover {
color: $black;
}
}

0 comments on commit 0cb7f04

Please sign in to comment.