diff --git a/src/App.jsx b/src/App.jsx index 80c21e3..4471420 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -117,6 +117,7 @@ function App() { heading="Enter Your Text to Analyse" showAlert={showAlert} theme={theme} + currentTheme={currentTheme} colorTheme={colorTheme} text={text} setText={addToHistory} diff --git a/src/components/SummaryCard.jsx b/src/components/SummaryCard.jsx index 3800b88..59c4b05 100644 --- a/src/components/SummaryCard.jsx +++ b/src/components/SummaryCard.jsx @@ -1,7 +1,7 @@ import React from "react"; import { wordCount } from "../utils"; -const SummaryCard = ({ theme, t, text = "", topWords = [] }) => { +const SummaryCard = ({ theme, currentTheme, t, text = "", topWords = [] }) => { const words = wordCount(text); const charCount = (text || "").length; const readingTime = (0.008 * words).toFixed(2); @@ -12,6 +12,11 @@ const SummaryCard = ({ theme, t, text = "", topWords = [] }) => { { id: "reading", label: t("textForm.readingTime"), value: `${readingTime} ${t("textForm.minutes")}` }, ]; + // Use theme specific colors if available, otherwise fallback to defaults + const cardBg = currentTheme?.cardBg || (theme === "light" ? "from-yellow-200 to-yellow-300" : "from-gray-800 to-gray-700"); + const cardBorder = currentTheme?.cardBorder || (theme === "light" ? "border-yellow-400" : "border-gray-700"); + const cardHover = currentTheme?.cardHover || (theme === "light" ? "hover:shadow-yellow-400" : "hover:shadow-gray-600"); + return (
{
- {cards.map((c, idx) => ( + {cards.map((c) => (

{