1.7k
type Props = { imageUrl: string children: React.ReactNode} export default function ImageCard({ imageUrl, children }: Props) { return ( <figure className="w-[250px] overflow-hidden rounded-base border-2 border-border dark:border-darkBorder bg-main font-base shadow-light dark:shadow-dark"> <img className="w-full" src={imageUrl} alt="image" /> <figcaption className="border-t-2 text-text border-border dark:border-darkBorder p-4"> {children} </figcaption> </figure> )}
import ImageCard from '@/components/ImageCard'
<ImageCard imageUrl="https://hips.hearstapps.com/hmg-prod/images/flowers-trees-and-bushes-reach-their-peak-of-full-bloom-in-news-photo-1678292967.jpg?resize=300:*"> Image</ImageCard>
xd