- Added essential configuration files including components.json, package.json, and tsconfig.json to establish the component library structure. - Introduced global styles in globals.css and layout structure in layout.tsx for consistent design application. - Implemented various UI components such as Accordion, AlertDialog, Button, Card, and more, enhancing the component library for future development. - Included utility functions and hooks to support component functionality and responsiveness. This commit sets up the groundwork for a comprehensive UI component library, facilitating a modular and scalable design system.
38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
import * as React from "react"
|
|
import { cn } from "@/lib/utils"
|
|
|
|
export interface GalleryCardProps extends React.HTMLAttributes<HTMLElement> {
|
|
src: string
|
|
alt: string
|
|
label: string
|
|
aspectRatio?: string
|
|
}
|
|
|
|
const GalleryCard = React.forwardRef<HTMLElement, GalleryCardProps>(
|
|
({ className, src, alt, label, aspectRatio = "3/4", ...props }, ref) => {
|
|
return (
|
|
<figure ref={ref} className={cn("m-0 group", className)} {...props}>
|
|
<div
|
|
className={cn(
|
|
"rounded-[28px] overflow-hidden mb-4",
|
|
"shadow-[var(--shadow-lg)]",
|
|
"transition-all duration-300 ease-out",
|
|
"group-hover:-translate-y-1.5 group-hover:shadow-[var(--shadow-bloom)]",
|
|
)}
|
|
style={{ aspectRatio }}
|
|
>
|
|
<img
|
|
src={src || "/placeholder.svg"}
|
|
alt={alt}
|
|
className="w-full h-full object-cover transition-transform duration-300 ease-out group-hover:scale-[1.03]"
|
|
/>
|
|
</div>
|
|
<figcaption className="text-[0.7rem] uppercase tracking-[0.25em] opacity-80">{label}</figcaption>
|
|
</figure>
|
|
)
|
|
},
|
|
)
|
|
GalleryCard.displayName = "GalleryCard"
|
|
|
|
export { GalleryCard }
|