From cc763f5416f6b784777421bf4313502ace43fac4 Mon Sep 17 00:00:00 2001 From: Kapil Gupta Date: Sat, 8 Jun 2024 14:26:51 +0530 Subject: [PATCH 1/3] https://github.com/Avdhesh-Varshney/Chanakya-Niti/issues/36 --- src/components/Alert/Alert.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Alert/Alert.jsx b/src/components/Alert/Alert.jsx index 993451b..f13dedc 100644 --- a/src/components/Alert/Alert.jsx +++ b/src/components/Alert/Alert.jsx @@ -2,7 +2,7 @@ import React from 'react' const Alert = (props) => { return ( -
+
{props.alert &&
{props.alert.msg}
} From 2eb1ba8167df1ac8603c2069cd475911ec7521d6 Mon Sep 17 00:00:00 2001 From: Kapil Gupta Date: Sun, 9 Jun 2024 11:38:36 +0530 Subject: [PATCH 2/3] did modification for issue #36 --- src/App.jsx | 6 +++--- src/components/Alert/Alert.css | 8 ++++++++ src/components/Alert/Alert.jsx | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 src/components/Alert/Alert.css diff --git a/src/App.jsx b/src/App.jsx index e63e8c3..c978932 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -41,9 +41,9 @@ function App() { setAlert({ msg: message }) - setTimeout(() => { - setAlert(null); - }, 3500); + // setTimeout(() => { + // setAlert(null); + // }, 3500); } return ( diff --git a/src/components/Alert/Alert.css b/src/components/Alert/Alert.css new file mode 100644 index 0000000..8800eb0 --- /dev/null +++ b/src/components/Alert/Alert.css @@ -0,0 +1,8 @@ +.addMarginBottom{ + margin-bottom: 5% ; +} +@media (min-width:321px) and (max-width:621px){ + .addMarginBottom{ + margin-bottom: 12% ; + } +} \ No newline at end of file diff --git a/src/components/Alert/Alert.jsx b/src/components/Alert/Alert.jsx index f13dedc..905b324 100644 --- a/src/components/Alert/Alert.jsx +++ b/src/components/Alert/Alert.jsx @@ -1,8 +1,8 @@ import React from 'react' - +import './Alert.css' const Alert = (props) => { return ( -
+
{props.alert &&
{props.alert.msg}
} From 7306e4b0fe44162f4551885665b9a27edb86154b Mon Sep 17 00:00:00 2001 From: KAPIL GUPTA <59639410+kapilG0@users.noreply.github.com> Date: Mon, 10 Jun 2024 08:16:12 +0530 Subject: [PATCH 3/3] Update App.jsx --- src/App.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index c978932..cbba53b 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -41,9 +41,9 @@ function App() { setAlert({ msg: message }) - // setTimeout(() => { - // setAlert(null); - // }, 3500); + setTimeout(() => { + setAlert(null); + }, 3500); } return (