import React, { ReactNode } from "react"; import { Button } from "./Button"; import { EventSetting } from "./EventSetting"; import { Image } from "./Image"; import { Link } from "./Link"; import styles from "./EventCard.module.css"; interface EventCardProps { name: string; short: string; startDate: Date; endDate?: Date; online: boolean; location: string; poster?: string; registerLink?: string; permaLink: string; showDescription?: boolean; children: ReactNode; year: number; term: string; slug: string; titleLinked: boolean; } export function EventCard({ permaLink, name, startDate, endDate, online, location, poster, registerLink, children, showDescription = false, year, term, slug, titleLinked, }: EventCardProps) { return (
{poster && ( )}

{titleLinked ? ( {name} ) : ( name )}

{!showDescription && ( Learn more )}
{children}
{!poster && registerLink && ( )}
); }