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; date: Date; online: boolean; location: string; poster?: string; registerLink?: string; permaLink: string; showDescription?: boolean; children: ReactNode; } export function EventCard({ permaLink, name, date, online, location, poster, registerLink, children, showDescription = false, }: EventCardProps) { return (
{poster && ( )}

{name}

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