kx3dex_radio/components/ui/blogCard.tsx

68 lines
1.5 KiB
TypeScript
Raw Normal View History

2024-03-24 06:08:52 +00:00
import * as React from "react"
import { cn } from "@/lib/utils"
const BlogCard = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLDivElement>
>(({ className, ...props }, ref) => (
<div
ref={ref}
className={cn(
"rounded-lg border bg-card text-card-foreground shadow-sm",
className
)}
{...props}
/>
))
BlogCard.displayName = "Blog Card"
const BlogCardImage = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLDivElement>
>(({ className, ...props }, ref) => (
<div
ref={ref}
className={cn("float-left w-1/4", className)}
{...props}
/>
))
BlogCardImage.displayName = "Blog Card Image"
const BlogCardContent = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLDivElement>
>(({ className, ...props }, ref) => (
<div
ref={ref}
className={cn("float-right w-3/4 h-full", className)}
{...props}
/>
))
BlogCardContent.displayName = "Blog Card Content"
const BlogCardText = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLDivElement>
>(({ className, ...props }, ref) => (
<div
ref={ref}
className={cn("p-4 h-3/4", className)}
{...props}
/>
))
BlogCardText.displayName = "Blog Card Text"
const BlogCardMore = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLDivElement>
>(({ className, ...props }, ref) => (
<div
ref={ref}
className={cn("px-4 h-1/4", className)}
{...props}
/>
))
BlogCardMore.displayName = "Blog Card Read More"
export { BlogCard, BlogCardImage, BlogCardContent, BlogCardText, BlogCardMore }