import { Label, LabelGroup, Link } from '@primer/react' import { ValidOcticon, getOcticonComponent } from '../lib/octicons' import styles from './CookBookArticleCard.module.scss' type IconType = ValidOcticon type Props = { title: string icon?: IconType url: string description: string tags: string[] spotlight?: boolean image?: string complexity?: string } function setImage(image: string, alt: string) { return image ? {alt} : null } const spotlightClasses = 'd-flex flex-column align-items-center' export const CookBookArticleCard = ({ title, icon, tags, description, image = '', url, spotlight = false, }: Props) => { const IconComponent = getOcticonComponent(icon) return (
{spotlight ? setImage(image, title) : null} {spotlight ? null : IconComponent && ( )}

{title}

{description}
{tags.map((tag, index) => ( ))}
) }