Files
web/components/TempDesignSystem/Card/index.tsx
2024-05-07 08:28:53 +02:00

37 lines
791 B
TypeScript

import Title from "@/components/Title"
import Button from "../Button"
import Link from "../Link"
import { CardProps } from "./card"
import styles from "./card.module.css"
export default function Card({
link,
subtitle,
title,
openInNewTab = false,
}: CardProps) {
return (
<article className={styles.linkCard}>
{title ? (
<Title level="h3" weight="semiBold">
{title}
</Title>
) : null}
{subtitle ? (
<Title level="h5" weight="light">
{subtitle}
</Title>
) : null}
{link ? (
<Button asChild intent="primary">
<Link href={link.href} target={openInNewTab ? "_blank" : undefined}>
{link.title}
</Link>
</Button>
) : null}
</article>
)
}