From 2a05c4d5df6a6f822d8803ee8dbee3d3e7a3246d Mon Sep 17 00:00:00 2001 From: Akshat <82810411+Afterdie@users.noreply.github.com> Date: Fri, 8 Dec 2023 17:21:26 +0530 Subject: [PATCH 1/2] fixed positioning --- src/reusableComponents/Darkmode/index.css | 5 +++++ src/reusableComponents/Darkmode/index.jsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/reusableComponents/Darkmode/index.css b/src/reusableComponents/Darkmode/index.css index 15661c7a7..f1fbcade2 100644 --- a/src/reusableComponents/Darkmode/index.css +++ b/src/reusableComponents/Darkmode/index.css @@ -27,3 +27,8 @@ .toggle-btn-mui > span > span > input { cursor: pointer; } + +.toggle-container{ + position: absolute; + top: 0px; +} \ No newline at end of file diff --git a/src/reusableComponents/Darkmode/index.jsx b/src/reusableComponents/Darkmode/index.jsx index e06377841..8b7f2a85a 100644 --- a/src/reusableComponents/Darkmode/index.jsx +++ b/src/reusableComponents/Darkmode/index.jsx @@ -44,7 +44,7 @@ const Darkmode = () => { }; return ( -
+
From 97f55fc6463e95e15815337716b8b8bdf2e3caa5 Mon Sep 17 00:00:00 2001 From: Akshat <82810411+Afterdie@users.noreply.github.com> Date: Sun, 10 Dec 2023 03:29:10 +0530 Subject: [PATCH 2/2] fix: fixed edge cases --- src/reusableComponents/Darkmode/index.css | 8 +++++--- src/reusableComponents/Darkmode/index.jsx | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/reusableComponents/Darkmode/index.css b/src/reusableComponents/Darkmode/index.css index f1fbcade2..22f45368c 100644 --- a/src/reusableComponents/Darkmode/index.css +++ b/src/reusableComponents/Darkmode/index.css @@ -28,7 +28,9 @@ cursor: pointer; } -.toggle-container{ - position: absolute; - top: 0px; +@media (min-width: 840px){ + .toggle-container { + position: absolute; + top: 0px; + } } \ No newline at end of file diff --git a/src/reusableComponents/Darkmode/index.jsx b/src/reusableComponents/Darkmode/index.jsx index 8b7f2a85a..728882cae 100644 --- a/src/reusableComponents/Darkmode/index.jsx +++ b/src/reusableComponents/Darkmode/index.jsx @@ -44,7 +44,7 @@ const Darkmode = () => { }; return ( -
+