diff --git a/src/components/cardStack/layouts/grid/GridLayout.tsx b/src/components/cardStack/layouts/grid/GridLayout.tsx index bbf678c..f308c49 100644 --- a/src/components/cardStack/layouts/grid/GridLayout.tsx +++ b/src/components/cardStack/layouts/grid/GridLayout.tsx @@ -1,26 +1,150 @@ -import React, { useRef } from "react"; -import { useCardAnimation } from "@/components/cardStack/hooks/useCardAnimation"; +"use client"; -interface GridLayoutProps { - items?: any[]; -} +import { memo, Children } from "react"; +import CardStackTextBox from "../../CardStackTextBox"; +import { cls } from "@/lib/utils"; +import { GridLayoutProps } from "../../types"; +import { gridConfigs } from "./gridConfigs"; +import { useCardAnimation } from "../../hooks/useCardAnimation"; -export default function GridLayout({ items = [] }: GridLayoutProps) { - const state = useCardAnimation({ - rotationX: 0, - rotationY: 0, - rotationZ: 0, - perspective: 1000, - duration: 0.3, - }); +const GridLayout = ({ + children, + itemCount, + gridVariant = "uniform-all-items-equal", + uniformGridCustomHeightClasses, + gridRowsClassName, + itemHeightClassesOverride, + animationType, + supports3DAnimation = false, + title, + titleSegments, + description, + tag, + tagIcon, + tagAnimation, + buttons, + buttonAnimation, + textboxLayout = "default", + useInvertedBackground, + bottomContent, + className = "", + containerClassName = "", + gridClassName = "", + textBoxClassName = "", + titleClassName = "", + titleImageWrapperClassName = "", + titleImageClassName = "", + descriptionClassName = "", + tagClassName = "", + buttonContainerClassName = "", + buttonClassName = "", + buttonTextClassName = "", + ariaLabel, +}: GridLayoutProps) => { + // Get config for this variant and item count + const config = gridConfigs[gridVariant]?.[itemCount]; - return ( -