{ "name": "blog-card-three", "type": "registry:ui", "registryDependencies": [], "dependencies": [ "lucide-react" ], "devDependencies": [], "tailwind": {}, "cssVars": { "light": {}, "dark": {} }, "files": [ { "path": "blog-card-three.tsx", "content": "'use client';\n\nimport * as React from 'react';\nimport Link from 'next/link';\nimport { ThumbsUp, Bookmark } from 'lucide-react';\nimport { cn } from '@/lib/utils';\n\nexport type BlogCardThreeMeta = {\n author?: { name: string; avatar?: string; href?: string };\n readLabel?: string; // \"2 min read\"\n};\n\nexport type BlogCardThreeProps = {\n /** Whole card link */\n href?: string;\n\n /** Title */\n title: string;\n\n /** Small square thumbnail */\n thumb?: { src: string; alt?: string };\n\n /** Meta row */\n meta?: BlogCardThreeMeta;\n\n /** Actions */\n onLike?: () => void;\n onBookmark?: () => void;\n\n /** Layout */\n variant?: 'thumb-right' | 'thumb-left';\n\n /** Slot overrides */\n className?: string;\n titleClassName?: string;\n thumbClassName?: string;\n metaClassName?: string;\n actionsClassName?: string;\n};\n\nexport function BlogCardThree({\n href,\n title,\n thumb,\n meta,\n onLike,\n onBookmark,\n variant = 'thumb-right',\n className,\n titleClassName,\n thumbClassName,\n metaClassName,\n actionsClassName,\n}: BlogCardThreeProps) {\n const Wrapper: any = href ? Link : 'article';\n const wrapperProps = href\n ? { href, 'aria-label': title }\n : { role: 'article' };\n\n const Thumb = (\n \n {/* eslint-disable-next-line @next/next/no-img-element */}\n {thumb?.src ? (\n \n ) : (\n
\n no image\n
\n )}\n \n );\n\n return (\n \n {/* optional left thumb */}\n {variant === 'thumb-left' && Thumb}\n\n
\n {/* title */}\n \n {title}\n \n\n {/* bottom row */}\n
\n {/* meta */}\n
\n {meta?.author && (\n \n {meta.author.avatar && (\n // eslint-disable-next-line @next/next/no-img-element\n \n )}\n {meta.author.href ? (\n e.stopPropagation()}\n className='font-medium hover:underline'\n >\n {meta.author.name}\n \n ) : (\n {meta.author.name}\n )}\n \n )}\n\n {meta?.readLabel && (\n \n {meta.readLabel}\n \n )}\n
\n\n {/* actions */}\n \n {\n e.preventDefault();\n onLike?.();\n }}\n className='rounded-md p-1.5 hover:bg-zinc-100 hover:text-zinc-800 dark:hover:bg-zinc-800 dark:hover:text-zinc-100'\n >\n \n \n {\n e.preventDefault();\n onBookmark?.();\n }}\n className='rounded-md p-1.5 hover:bg-zinc-100 hover:text-zinc-800 dark:hover:bg-zinc-800 dark:hover:text-zinc-100'\n >\n \n \n
\n
\n \n\n {/* default: right thumb */}\n {variant === 'thumb-right' && Thumb}\n \n );\n}\n\n/** Presets for convenience */\nexport function MinimalBlogCardRight(\n props: Omit\n) {\n return ;\n}\nexport function MinimalBlogCardLeft(\n props: Omit\n) {\n return ;\n}\n", "type": "registry:ui" } ] }