From d506b6fa7057da8ba6e41416215633870840b51f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Murat=20G=C3=BCven?= Date: Wed, 8 Oct 2025 14:16:46 +0300 Subject: [PATCH 1/3] Revamp dashboard UI with animated metrics and gradients --- src/App.jsx | 443 ++++++++++++++++++++++++++++++++++++++------- src/index.css | 62 ++++++- tailwind.config.js | 18 ++ 3 files changed, 460 insertions(+), 63 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 9f1e20a..40081bd 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -12,24 +12,48 @@ const round = (value, decimals = 1) => { const Section = ({ id, title, description, isOpen, onToggle, children }) => (
- - {isOpen ?
{children}
: null} +
+
+ + {isOpen ? ( +
+ {children} +
+ ) : null} +
); @@ -75,10 +99,10 @@ const ToggleCard = ({ active, title, description, onClick }) => ( - {isOpen ? ( -
- {children} +const Section = ({ + id, + title, + description, + isOpen = true, + onToggle, + children, + variant = 'default', + meta, + className = '', +}) => { + const collapsible = typeof onToggle === 'function'; + const containerClasses = + variant === 'compact' + ? 'rounded-2xl border border-slate-200 bg-white/90 p-6 shadow-lg shadow-slate-900/5 backdrop-blur' + : 'rounded-3xl border border-slate-200/80 bg-white/90 p-8 shadow-xl shadow-slate-900/10 backdrop-blur'; + + return ( +
+
+
+
+ Assessment Module +

{title}

+ {description ?

{description}

: null} +
+
+ {meta} + {collapsible ? ( + + ) : null} +
- ) : null} -
-
-); + {!collapsible || isOpen ? ( +
+ {children} +
+ ) : null} +
+ + ); +}; const SelectField = ({ id, label, options, value, onChange, required }) => (