Egyptian Recipes
As it said ancient Egypt was a wonderful place to grow food because the civilization grew around the fertile Nile river. Today Egyptian still grow their own food in Egypt soil and have different recipes that are healthy and delicious. In this project I’ll explain how to create and search for recipes.
Table of Contents:
Style Conclusion
Use node package to download and manage packages in your application from Nodejs.org. Download the Windows installer
Next, run these two commands and name your project: npm install -g create-react-app create-react-app recipesProject I named my project recipesProject, but you can name it whatever you like.
import React from “react”; import Recipe from ‘/Recipe’; import “./App.css”; const App = () => { return ( <div className="App">
</div>
); } } export default App;
Import and configure this API fetching library in App.js file.
run npm start in command line. Then open http://localhost:3000/ to see your app.
.App{ min-height: 50vh; background-image: linear-gradient( 90deg, #74EBD5 0%, #9FACE6 100% ); } .search-form { min-height: 10vh; display: flex; justify-content: center; align-items: center; }
.search-bar {
width: 20%;
border-style: double;
padding: 10px; }
.search-button {
background-color: #9FACE6;
border: black;
border-style: double;
padding: 10px 20px;
color: black;
}
.recipes {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
} Create Css module to our app to capsulate for the css to a component 1. First, create a normal CSS file. 2. Add CSS classes to this file. 3. Import the module you've just created from within your component. And import style from recipe module .css in recipe.js. 4. Refer to it as a normal property from the styles object, like: image, recipe.
recipe { border-radius: 10px; box-shadow: 0px 5px 20px teal; margin: 10px; display: inline flexbox; flex-direction: row; justify-content: center; background: lavender; align-items: center; min-width: 40px; }
. image{ border-radius: 40%; width: 50%; height: 50%; } Conclusion:
After wrapping up, the page will look like this