- Introduced multiple new components including AnimatedLink, Button, Calendar, Card, ColorSwatch, Divider, Filmstrip, FormContainer, FormField, GalleryCard, Heading, HeroOverlay, IdentitySection, ImmersionSection, NewArtistsSection, NewContactSection, NewHero, NewNavigation, Reveal, SectionLabel, StickySplit, and Toast. - Each component is designed with responsive layouts and customizable styles to improve the overall UI consistency and interactivity. - Implemented accessibility features and animations to enhance user engagement. This commit significantly expands the component library, providing a robust foundation for building a cohesive user interface.
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 }
|