From 46516920911ba28fa493870cd41dffad0a1c6826 Mon Sep 17 00:00:00 2001 From: yadnyavalkyaw Date: Sun, 23 Aug 2026 22:29:47 +0530 Subject: [PATCH] feat: add reusable loading spinner --- src/App.css | 7 +++++++ src/components/Loading.jsx | 10 ---------- src/components/LoadingSpinner.jsx | 9 +++++++++ 3 files changed, 16 insertions(+), 10 deletions(-) delete mode 100644 src/components/Loading.jsx create mode 100644 src/components/LoadingSpinner.jsx diff --git a/src/App.css b/src/App.css index 73a237a..748db9f 100644 --- a/src/App.css +++ b/src/App.css @@ -141,12 +141,19 @@ html[data-theme="dark"] .welcome p { .loading-spinner { width: 40px; height: 40px; + max-width: 100%; + flex-shrink: 0; border: 4px solid #f3f3f3; border-top: 4px solid #8e8dd3; border-radius: 50%; animation: spin 1s linear infinite; } +html[data-theme="dark"] .loading-spinner { + border-color: #333; + border-top-color: #8e8dd3; +} + @keyframes spin { to { transform: rotate(360deg); diff --git a/src/components/Loading.jsx b/src/components/Loading.jsx deleted file mode 100644 index af91c3b..0000000 --- a/src/components/Loading.jsx +++ /dev/null @@ -1,10 +0,0 @@ - -function Loading() { - return ( -
-
-
- ); -} - -export default Loading; \ No newline at end of file diff --git a/src/components/LoadingSpinner.jsx b/src/components/LoadingSpinner.jsx new file mode 100644 index 0000000..c3c40c4 --- /dev/null +++ b/src/components/LoadingSpinner.jsx @@ -0,0 +1,9 @@ +function LoadingSpinner() { + return ( +
+ +
+ ); +} + +export default LoadingSpinner;