+ {blog.title} +
+ ++ {blog.excerpt} +
++ {blog.authorName} +
++ {blog.date} +
+diff --git a/src/components/sections/blog/BlogCardOne.tsx b/src/components/sections/blog/BlogCardOne.tsx index 2d9fb9b..dcb77bc 100644 --- a/src/components/sections/blog/BlogCardOne.tsx +++ b/src/components/sections/blog/BlogCardOne.tsx @@ -1,28 +1,244 @@ -import React from "react"; -import { CardStack } from "@/components/cardStack/CardStack"; +"use client"; + +import { memo } from "react"; +import Image from "next/image"; +import CardStack from "@/components/cardStack/CardStack"; +import Badge from "@/components/shared/Badge"; +import OverlayArrowButton from "@/components/shared/OverlayArrowButton"; +import { cls, shouldUseInvertedText } from "@/lib/utils"; +import { useTheme } from "@/providers/themeProvider/ThemeProvider"; +import type { BlogPost } from "@/lib/api/blog"; +import type { LucideIcon } from "lucide-react"; +import type { ButtonConfig, CardAnimationType, TitleSegment, ButtonAnimationType } from "@/components/cardStack/types"; +import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants"; + +type BlogCard = BlogPost; interface BlogCardOneProps { - blogs?: any[]; - title?: string; - description?: string; - animationType?: string; - textboxLayout?: string; - useInvertedBackground?: boolean; + blogs: BlogCard[]; + carouselMode?: "auto" | "buttons"; + uniformGridCustomHeightClasses?: string; + animationType: CardAnimationType; + title: string; + titleSegments?: TitleSegment[]; + description: string; + tag?: string; + tagIcon?: LucideIcon; + tagAnimation?: ButtonAnimationType; + buttons?: ButtonConfig[]; + buttonAnimation?: ButtonAnimationType; + textboxLayout: TextboxLayout; + useInvertedBackground: InvertedBackground; + ariaLabel?: string; + className?: string; + containerClassName?: string; + cardClassName?: string; + imageWrapperClassName?: string; + imageClassName?: string; + categoryClassName?: string; + cardTitleClassName?: string; + excerptClassName?: string; + authorContainerClassName?: string; + authorAvatarClassName?: string; + authorNameClassName?: string; + dateClassName?: string; + textBoxTitleClassName?: string; + textBoxTitleImageWrapperClassName?: string; + textBoxTitleImageClassName?: string; + textBoxDescriptionClassName?: string; + gridClassName?: string; + carouselClassName?: string; + controlsClassName?: string; + textBoxClassName?: string; + textBoxTagClassName?: string; + textBoxButtonContainerClassName?: string; + textBoxButtonClassName?: string; + textBoxButtonTextClassName?: string; } -export default function BlogCardOne({ - blogs = [], - title = "Blog", description = "Latest articles", animationType = "slide-up", textboxLayout = "default", useInvertedBackground = false, -}: BlogCardOneProps) { - const items = blogs.map((blog) => ({ - id: blog.id, - label: blog.title, - detail: blog.excerpt, - })); - - return ( -
+ {blog.excerpt} +
++ {blog.authorName} +
++ {blog.date} +
+