Skip to content

Commit 7403c59

Browse files
authored
Revert "changes"
1 parent eba2baa commit 7403c59

File tree

5 files changed

+4
-32
lines changed

5 files changed

+4
-32
lines changed

Diff for: public/index.html

-8
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,4 @@
4040
To create a production bundle, use `npm run build` or `yarn build`.
4141
-->
4242
</body>
43-
<script>
44-
const colors = ["#F70202", "#6BD620"];
45-
const label = document.querySelector('.recipe div').textContent;
46-
const labelColor = document.querySelector('.recipe__label');
47-
if (label == 'low-carb'){
48-
labelColor.style.background = colors[1];
49-
}
50-
</script>
5143
</html>

Diff for: src/App.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const App = () => {
5555
title={recipe.recipe.label}
5656
calories={recipe.recipe.calories}
5757
image={recipe.recipe.image}
58-
diet={recipe.recipe.dietLabels}></Recipe>
58+
ingredients={recipe.recipe.ingredients}></Recipe>
5959
))}
6060
</div>
6161
</div>

Diff for: src/recipe.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
import React from 'react';
22
import style from './recipe.module.css';
33

4-
const Recipe = ({title,calories,image, diet, url}) => {
5-
4+
const Recipe = ({title,calories,image, ingredients, url}) => {
65
return(
76
<div className={style.recipe}>
87
<a href={url} className="recipe__url" target="_blank" rel="noopener noreferrer"><h1>{title}</h1></a>
98
<small><strong>Calorie count:</strong> {calories.toFixed(2)}</small>
10-
<div className="recipe__label">{diet}</div>
119
<img src={image} alt="" className="recipe__image"/>
1210
</div>
1311
)
14-
1512
}
1613

1714
export default Recipe

Diff for: src/recipe.module.css

+1-10
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222

2323
.recipe a:hover {
24-
color: #9932cc;
24+
color: darkorchid;
2525
-webkit-transition: 250ms ease-in-out;
2626
transition: 250ms ease-in-out;
2727
}
@@ -43,15 +43,6 @@
4343
height: auto;
4444
}
4545

46-
.recipe div {
47-
background: #FFBE0B;
48-
color: #191716;
49-
padding: 0.2em 0.8em;
50-
-ms-grid-column-align: center;
51-
justify-self: center;
52-
text-align: center;
53-
}
54-
5546
.active {
5647
opacity: 1;
5748
-webkit-transition: opacity 120ms ease-in;

Diff for: src/recipe.module.scss

+1-9
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
color: #121212;
1616

1717
&:hover{
18-
color: #9932cc;
18+
color: darkorchid;
1919
transition: 250ms ease-in-out;
2020
}
2121

@@ -34,14 +34,6 @@
3434
width: 100%;
3535
height: auto;
3636
}
37-
38-
div{
39-
background: #FFBE0B;
40-
color: #191716;
41-
padding: 0.2em 0.8em;
42-
justify-self: center;
43-
text-align: center;
44-
}
4537
}
4638

4739
.active{

0 commit comments

Comments
 (0)