From 0770032513125ac5df25b28610620c203aba3ea5 Mon Sep 17 00:00:00 2001 From: Rajneesh Kumar Date: Tue, 17 Oct 2023 11:03:43 +0530 Subject: [PATCH 1/2] added clear button beside submit button --- src/App.js | 11 +++++++++++ src/index.css | 18 ++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/src/App.js b/src/App.js index c0ae1c7..eac5399 100644 --- a/src/App.js +++ b/src/App.js @@ -7,6 +7,8 @@ import 'react-toastify/dist/ReactToastify.css'; class App extends React.Component { constructor() { super(); + + this.state = { city_name: "london", error: false, @@ -23,6 +25,7 @@ class App extends React.Component { }; this.city = this.city.bind(this); this.submit = this.submit.bind(this); + this.clearInput = this.clearInput.bind(this); this.componentWillMount = this.componentWillMount.bind(this); this.closeToasterMessage = this.closeToasterMessage.bind(this); } @@ -48,6 +51,11 @@ class App extends React.Component { e.preventDefault(); this.componentWillMount(); } + clearInput() { + this.setState({ + city_name: "", + }); + } componentWillMount() { document.body.style.filter = "blur(0px)"; @@ -117,6 +125,9 @@ class App extends React.Component { + Date: Tue, 17 Oct 2023 11:40:40 +0530 Subject: [PATCH 2/2] made changes in ui --- src/Footer.js | 33 +++++++++++++++++---------------- src/Header.js | 5 ++++- src/index.css | 22 +++++++++++++++++++--- 3 files changed, 40 insertions(+), 20 deletions(-) diff --git a/src/Footer.js b/src/Footer.js index feea41a..b8ed8a3 100644 --- a/src/Footer.js +++ b/src/Footer.js @@ -1,19 +1,20 @@ -import React from "react" -import "./index.css" +import React from "react"; +import "./index.css"; -function Footer(){ - return( - - ) -} +function Footer() { + const year = new Date().getFullYear(); -export default Footer + return ( +
+
+
+ +

Source OpenWeather

+ +
+
+
+ ); +} +export default Footer; diff --git a/src/Header.js b/src/Header.js index e4bbb1c..5dd4c86 100644 --- a/src/Header.js +++ b/src/Header.js @@ -1,11 +1,14 @@ import React from "react"; import "./index.css"; +import {TiWeatherSunny} from 'react-icons/ti' function Header() { return (
-

GET WEATHER 💨

+

+ GET WEATHER +

); diff --git a/src/index.css b/src/index.css index aec611b..59f6415 100644 --- a/src/index.css +++ b/src/index.css @@ -17,10 +17,15 @@ footer { color: white; background-color: #192733; padding: 1.5rem; + + text-align: center; } + + header { margin-bottom: 2rem; + } footer { @@ -40,13 +45,21 @@ a:hover { width: 90%; max-width: 1110px; margin: 0 auto; + } /* TYPOGRAPHY */ .title { - font-size: 2.5rem; - font-weight: 20px; - padding-left: 0.6rem; + font-size: 3rem; + font-weight: 24px; + padding-left: 0.rem; + font-family:Arial, Helvetica, sans-serif +} +.logo{ + font-size: 50px; + vertical-align: middle; + margin-left: 10px; + } h2 { @@ -289,3 +302,6 @@ p { transform: rotate(360deg); } } +.footer1{ + font-size: 20px; +}