From b79ffaefbd5b1b1ebf6802faa04e31f379a2c47e Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sun, 9 Nov 2025 09:27:54 +0000 Subject: [PATCH] Update ResourceSectionsGrid to use DocsThemeContext colors cgen-488a89e70d4e494cbda5ff0312f8a3c2 --- client/components/docs/DocsHeroSection.tsx | 30 +++++++++------- client/components/docs/DocsSupportCTA.tsx | 35 ++++++++++++++----- .../components/docs/LearningResourcesGrid.tsx | 15 +++++--- .../components/docs/RecentUpdatesSection.tsx | 27 ++++++++++---- .../components/docs/ResourceSectionsGrid.tsx | 33 ++++++++++++----- 5 files changed, 100 insertions(+), 40 deletions(-) diff --git a/client/components/docs/DocsHeroSection.tsx b/client/components/docs/DocsHeroSection.tsx index 398e3a44..be509bd2 100644 --- a/client/components/docs/DocsHeroSection.tsx +++ b/client/components/docs/DocsHeroSection.tsx @@ -1,6 +1,7 @@ import { Button } from "@/components/ui/button"; import { Link } from "react-router-dom"; import { Rocket, Play } from "lucide-react"; +import { useDocsTheme } from "@/contexts/DocsThemeContext"; interface DocsHeroSectionProps { title?: string; @@ -13,31 +14,34 @@ export default function DocsHeroSection({ description = "Everything you need to build, deploy, and scale amazing projects with AeThex. Get started with our guides, explore our APIs, and learn from comprehensive tutorials.", showButtons = true, }: DocsHeroSectionProps) { + const { colors, theme } = useDocsTheme(); + const buttonClass = + theme === "professional" + ? "bg-black hover:bg-gray-900 text-white" + : "bg-purple-600 hover:bg-purple-700"; + const outlineButtonClass = + theme === "professional" + ? "border-gray-300 text-black hover:bg-gray-100" + : "border-slate-600 text-white hover:bg-slate-800"; + return (
-

{title}

-

+

+ {title} +

+

{description}

{showButtons && (
- - @@ -61,13 +72,15 @@ export default function RecentUpdatesSection({ {updates.map((update, index) => (
-

{update.title}

+

+ {update.title} +

{update.isNew && ( New @@ -77,10 +90,12 @@ export default function RecentUpdatesSection({ {update.type}
-

{update.description}

+

+ {update.description} +

-

{update.date}

+

{update.date}

diff --git a/client/components/docs/ResourceSectionsGrid.tsx b/client/components/docs/ResourceSectionsGrid.tsx index 06b49c48..7afbb253 100644 --- a/client/components/docs/ResourceSectionsGrid.tsx +++ b/client/components/docs/ResourceSectionsGrid.tsx @@ -16,6 +16,7 @@ import { Puzzle, LayoutDashboard, } from "lucide-react"; +import { useDocsTheme } from "@/contexts/DocsThemeContext"; export interface ResourceSection { title: string; @@ -91,9 +92,21 @@ interface ResourceSectionsGridProps { export default function ResourceSectionsGrid({ sections = defaultSections, }: ResourceSectionsGridProps) { + const { colors, theme } = useDocsTheme(); + const iconColor = theme === "professional" ? "text-gray-700" : "text-purple-400"; + const hoverBorderColor = + theme === "professional" ? "hover:border-gray-400" : "hover:border-purple-500/50"; + const hoverTitleColor = + theme === "professional" ? "group-hover:text-gray-900" : "group-hover:text-purple-400"; + const arrowColor = theme === "professional" ? "text-gray-600" : "text-purple-400"; + const explorehoverColor = + theme === "professional" + ? "group-hover:text-gray-900" + : "group-hover:text-purple-300"; + return (
-

+

Documentation Sections

@@ -102,18 +115,20 @@ export default function ResourceSectionsGrid({ return (
- + {section.badge}
- + {section.title} - + {section.description}
@@ -122,14 +137,16 @@ export default function ResourceSectionsGrid({ {section.items.map((item, itemIndex) => (
  • - + {item}
  • ))} -
    +
    Explore section