diff --git a/README.md b/README.md index 5711ee7f8..2bf8cafd2 100644 --- a/README.md +++ b/README.md @@ -1,136 +1,3 @@ -A hotel booking application in React. Homework for the [CodeYourFuture React module](https://codeyourfuture.github.io/syllabus-master/react/) - -![Bookings Search page](Bookings.png) - -# Installation - -1. Follow [the instructions](https://codeyourfuture.github.io/syllabus-master/others/making-a-pull-request.html#how-to-fork-a-github-repo) to fork & clone the GitHub repo -2. Install the dependencies by running `npm install` -3. Launch the server using `npm start` -4. It should automatically open `http://localhost:3000/` in your browser - -# Exercises - -## Lesson 1 - -#### 1. Extract the search button in its own component - -**Instructions:** Extract the search ` + + ); + }; +export default Order; diff --git a/src/component/restaurant.css b/src/component/restaurant.css new file mode 100644 index 000000000..bc82ee9fd --- /dev/null +++ b/src/component/restaurant.css @@ -0,0 +1,44 @@ +/* styles.css */ + + + +.restaurant-container { + max-width: 400px; + margin: 0 auto; + padding: 20px; + border: 1px solid #fff; + border-radius: 5px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + } + + .order-list { + list-style: none; + padding: 0; + } + + .order-item { + display: flex; + justify-content: space-between; + align-items: center; + padding: 10px; + border-bottom: 1px solid #ddd; + } + + .order-type { + font-weight: bold; + } + + .order-count { + margin-left: 10px; + font-weight: bold; + } + + .order-button { + background-color: #007bff; + color: white; + border: none; + border-radius: 5px; + padding: 5px 5px; + cursor: pointer; + } + \ No newline at end of file diff --git a/src/Search.js b/src/component/search/Search.jsx similarity index 90% rename from src/Search.js rename to src/component/search/Search.jsx index 7bd5871c0..bd26cf6da 100644 --- a/src/Search.js +++ b/src/component/search/Search.jsx @@ -1,4 +1,5 @@ import React from "react"; + import SearchButton from "./SearchButton" const Search = () => { return ( @@ -17,7 +18,7 @@ const Search = () => { className="form-control" placeholder="Customer name" /> - + diff --git a/src/component/search/SearchButton.jsx b/src/component/search/SearchButton.jsx new file mode 100644 index 000000000..6c32e8d8d --- /dev/null +++ b/src/component/search/SearchButton.jsx @@ -0,0 +1,12 @@ +import React from "react"; + + + +function SearchButton (){ + + return ( + + ) +} + +export default SearchButton; \ No newline at end of file diff --git a/src/index.css b/src/index.css index 4607bb217..6557ecc29 100644 --- a/src/index.css +++ b/src/index.css @@ -24,3 +24,27 @@ body { .search-row input { margin-right: 10px; } + +.Footer { + display: flex; + justify-content: center; + align-items: center; + background-color: #f1f1f1; + height: 100px; +} + +.Footer ul { + list-style: none; + display: flex; + padding: 0; + margin: 0; +} + +.Footer li { + margin: 0 10px; +} + +.selected-row { + background-color: #f0f0f0; /* Apply your desired highlight color */ + cursor: pointer; +} \ No newline at end of file