import { isYoutubeLink } from "@lib/string.ts"; import { IconBrandYoutube } from "@components/icons.tsx"; export function Card( { link, title, image, thumbnail, backgroundSize = 100 }: { backgroundSize?: number; thumbnail?: string; link?: string; title?: string; image?: string; }, ) { const backgroundStyle = { backgroundSize: "cover", boxShadow: "0px -60px 90px black inset, 0px 10px 20px #fff1 inset", }; if (backgroundSize !== 100) { backgroundStyle["backgroundSize"] = `${backgroundSize}%`; backgroundStyle["backgroundRepeat"] = "no-repeat"; backgroundStyle["backgroundPosition"] = "center"; } return ( {true && ( )}
{/* Recipe Card content */}
{isYoutubeLink(link || "") && } {title}
); }