From 2d60c3d4a2dc5c2f6dba57ed5bcefa2da4b4532d Mon Sep 17 00:00:00 2001 From: Alexander Mahan Date: Tue, 18 Aug 2026 14:26:39 -0700 Subject: [PATCH] add new PanelStack component to replace CarouselFeatured component --- community/developer-funding.page.tsx | 10 +- docs/use-cases/tokenization/index.page.tsx | 4 +- index.page.tsx | 4 +- shared/patterns/PanelStack/PanelStack.scss | 28 ++++ shared/patterns/PanelStack/PanelStack.tsx | 158 +++++++++++++++++++++ shared/patterns/PanelStack/index.ts | 7 + styles/xrpl.scss | 1 + 7 files changed, 203 insertions(+), 9 deletions(-) create mode 100644 shared/patterns/PanelStack/PanelStack.scss create mode 100644 shared/patterns/PanelStack/PanelStack.tsx create mode 100644 shared/patterns/PanelStack/index.ts diff --git a/community/developer-funding.page.tsx b/community/developer-funding.page.tsx index 68d24c1ec..1d7a0208b 100644 --- a/community/developer-funding.page.tsx +++ b/community/developer-funding.page.tsx @@ -3,9 +3,9 @@ import { useThemeHooks } from "@redocly/theme/core/hooks"; import { PageWrapper } from "shared/components/PageWrapper"; import { HeaderHeroSplitMedia } from "shared/sections/HeaderHeroSplitMedia/HeaderHeroSplitMedia"; import { - CarouselFeatured, - type CarouselSlide, -} from "shared/patterns/CarouselFeatured/CarouselFeatured"; + PanelStack, + type PanelStackPanel, +} from "shared/patterns/PanelStack"; import { LogoSquareGrid } from "shared/sections/LogoSquareGrid"; import { LinkTextDirectory } from "shared/sections/LinkTextDirectory/LinkTextDirectory"; import { FeatureSingleTopic } from "shared/sections/FeatureSingleTopic/FeatureSingleTopic"; @@ -22,7 +22,7 @@ export default function Funding() { const { useTranslate } = useThemeHooks(); const { translate } = useTranslate(); - const carouselSlides: CarouselSlide[] = [ + const carouselSlides: PanelStackPanel[] = [ { id: "xrpl-grants-accelerator", heading: translate("Explore XRPL Funding and Builders Programs"), @@ -156,7 +156,7 @@ export default function Funding() { }} /> - + {/* 5. Token Utility and Market Integration — Carousel Featured (4 slides from Assets frame) */} - - + * ``` + */ +export const PanelStack = React.forwardRef( + (props, ref) => { + const { slides, background = "grey", className, children, ...rest } = props; + + if (slides.length === 0) { + console.warn("PanelStack: No slides provided"); + return null; + } + + return ( +
+ {slides.map((slide, index) => ( + + + +
+
+

+ {slide.heading} +

+
+ +
+
    + {slide.features.map((feature, featureIndex) => ( +
  • + +
    + {feature.title} +
    +
    + {feature.description} +
    +
  • + ))} +
+ +
+ {slide.buttons && slide.buttons.length > 0 && ( + + )} +
+
+
+
+ + +
+ {slide.imageAlt} +
+
+
+
+ ))} + {children} +
+ ); + }, +); + +PanelStack.displayName = "PanelStack"; + +export default PanelStack; diff --git a/shared/patterns/PanelStack/index.ts b/shared/patterns/PanelStack/index.ts new file mode 100644 index 000000000..1cdb4489f --- /dev/null +++ b/shared/patterns/PanelStack/index.ts @@ -0,0 +1,7 @@ +export { + PanelStack, + type PanelStackProps, + type PanelStackBackground, + type PanelStackPanel, +} from "./PanelStack"; +export { default } from "./PanelStack"; diff --git a/styles/xrpl.scss b/styles/xrpl.scss index cdc9a77b9..591862e29 100644 --- a/styles/xrpl.scss +++ b/styles/xrpl.scss @@ -113,6 +113,7 @@ $line-height-base: 1.5; @import "../shared/sections/CardStatsList/CardStatsList.scss"; @import "../shared/sections/CarouselCardList/CarouselCardList.scss"; @import "../shared/patterns/CarouselFeatured/CarouselFeatured.scss"; +@import "../shared/patterns/PanelStack/PanelStack.scss"; @import "../shared/sections/LogoSquareGrid/LogoSquareGrid.scss"; @import "../shared/patterns/SectionHeader/SectionHeader.scss"; @import "../shared/sections/CardsFeatured/CardsFeatured.scss";