import { isYoutubeLink } from "@lib/string.ts"; import { IconBrandYoutube } from "@components/icons.tsx"; export function Card( { link, title, image, backgroundSize = 100 }: { backgroundSize?: number; link?: string; title?: string; image?: string; }, ) { const backgroundStyle = { backgroundImage: `url(${image})`, backgroundSize: "cover", }; if (backgroundSize !== 100) { backgroundStyle["backgroundSize"] = `${backgroundSize}%`; backgroundStyle["backgroundRepeat"] = "no-repeat"; backgroundStyle["backgroundPosition"] = "center"; } return (
{/* Recipe Card content */}
{isYoutubeLink(link || "") && } {title}
); }