diff --git a/components/ContentBox.js b/components/ContentBox.js
new file mode 100644
index 0000000..a2c8e8e
--- /dev/null
+++ b/components/ContentBox.js
@@ -0,0 +1,7 @@
+import styles from "./ContentBox.module.css";
+
+const ContentBox = ({ children }) => {
+ return
{children}
;
+};
+
+export default ContentBox;
diff --git a/components/ContentBox.module.css b/components/ContentBox.module.css
new file mode 100644
index 0000000..31dc882
--- /dev/null
+++ b/components/ContentBox.module.css
@@ -0,0 +1,12 @@
+.statsWrapper {
+ background-color: rgb(247, 247, 247);
+ padding: 30px;
+ text-align: right;
+ border-radius: 0 30px 30px 0;
+}
+
+@media only screen and (max-width: 950px) {
+ .statsWrapper {
+ border-radius: 0;
+ }
+}
diff --git a/components/Header.js b/components/Header.js
new file mode 100644
index 0000000..22612fd
--- /dev/null
+++ b/components/Header.js
@@ -0,0 +1,7 @@
+import styles from "./Header.module.css";
+
+const Header = ({ children }) => {
+ return {children}
;
+};
+
+export default Header;
diff --git a/components/Header.module.css b/components/Header.module.css
new file mode 100644
index 0000000..23bec5c
--- /dev/null
+++ b/components/Header.module.css
@@ -0,0 +1,12 @@
+.titleAndSearch {
+ display: grid;
+ grid-template-columns: 2fr 1fr;
+ gap: 20px;
+}
+
+@media only screen and (max-width: 520px) {
+ .titleAndSearch {
+ grid-template-columns: 1fr;
+ place-items: center;
+ }
+}
diff --git a/pages/index.js b/pages/index.js
index 921456e..fd85a39 100644
--- a/pages/index.js
+++ b/pages/index.js
@@ -1,6 +1,8 @@
import { useState, useEffect } from "react";
import MainCard from "../components/MainCard";
+import ContentBox from "../components/ContentBox";
+import Header from "../components/Header";
import Dates from "../components/Dates";
import Search from "../components/Search";
import Metrics from "../components/Metrics";
@@ -52,8 +54,8 @@ const App = () => {
systemUsed={systemUsed}
weatherData={weatherData}
/>
-
-
+
+
{
e.target.placeholder = "Search a city...";
}}
/>
-
+
-
+
) : weatherData && weatherData.message ? (
diff --git a/styles/Home.module.css b/styles/Home.module.css
index 55df649..3702c2e 100644
--- a/styles/Home.module.css
+++ b/styles/Home.module.css
@@ -11,19 +11,6 @@
margin: 0 20px;
}
-.statsWrapper {
- background-color: rgb(247, 247, 247);
- padding: 30px;
- text-align: right;
- border-radius: 0 30px 30px 0;
-}
-
-.titleAndSearch {
- display: grid;
- grid-template-columns: 2fr 1fr;
- gap: 20px;
-}
-
@media only screen and (max-width: 950px) {
.wrapper {
display: grid;
@@ -31,10 +18,6 @@
max-width: 600px;
margin: 20px auto;
}
-
- .statsWrapper {
- border-radius: 0;
- }
}
@media only screen and (max-width: 600px) {
@@ -43,10 +26,3 @@
border-radius: 0;
}
}
-
-@media only screen and (max-width: 520px) {
- .titleAndSearch {
- grid-template-columns: 1fr;
- place-items: center;
- }
-}