import Button from 'components/Button' type PostMetaProps = { name: string avatarUrl: string publishDate: string readLength: number } type Props = { title: string type: 'Project Example' | 'Case Study' | 'Blog Post' description: string imgUrl: string url: string logoUrl?: string ctaText?: string icons?: any[] postMeta?: PostMetaProps } const Card = (props: Props) => { const { title, type, description, imgUrl, url, logoUrl = '', ctaText = '', icons = [], postMeta = { name: '', avatarUrl: '', publishDate: '', readLength: '', }, } = props const iconMarkup = icons && icons.map((icon: any) => { return ( {icon.imgAlt} ) }) return (
{title}
{/* {icons && (
{iconMarkup}
)} */}

{type}

{/* {logoUrl && } */} {title &&

{title}

}

{type !== 'Project Example' ? postMeta.publishDate : description}

{type === 'Case Study' && postMeta.name.length > 0 && (
{postMeta.name}

{postMeta.name}

{postMeta.readLength} min read
)} {ctaText &&
) } export default Card