diff --git a/src/App.tsx b/src/App.tsx index 33d15f9..0e65143 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,13 +1,52 @@ import { Routes, Route } from 'react-router-dom'; import Layout from './components/Layout'; import HomePage from './pages/HomePage'; +import ProductFlipCards from './components/sections/product/ProductFlipCards'; export default function App() { return ( - - }> - } /> - - + <> + + }> + } /> + + + + + +
+ +
+ ); -} +} \ No newline at end of file diff --git a/src/components/sections/product/ProductFlipCards.tsx b/src/components/sections/product/ProductFlipCards.tsx new file mode 100644 index 0000000..cf9cbb6 --- /dev/null +++ b/src/components/sections/product/ProductFlipCards.tsx @@ -0,0 +1,103 @@ +import { motion } from "motion/react"; +import Button from "@/components/ui/Button"; +import TextAnimation from "@/components/ui/TextAnimation"; +import GridOrCarousel from "@/components/ui/GridOrCarousel"; + +type ProductFlipCardProps = { + tag: string; + title: string; + description: string; + primaryButton?: { text: string; href: string }; + secondaryButton?: { text: string; href: string }; + products: { + name: string; + price: string; + imageSrc: string; + detailedDescription: string; + onClick?: () => void; + }[]; +}; + +const ProductFlipCards = ({ + tag, + title, + description, + primaryButton, + secondaryButton, + products, +}: ProductFlipCardProps) => { + return ( +
+
+
+ {tag} + + + + + + {(primaryButton || secondaryButton) && ( +
+ {primaryButton &&
+ )} +
+ + + + {products.map((product) => ( +
+
+ {/* Front Side */} +
+
+ {product.name} +
+
+

{product.name}

+ {product.price} +
+
+ + {/* Back Side */} +
+

{product.name}

+

+ {product.detailedDescription} +

+
+
+
+ ))} +
+
+
+
+ ); +}; + +export default ProductFlipCards; \ No newline at end of file