feat: add card grid component
This commit is contained in:
38
components/TempDesignSystem/Card/index.tsx
Normal file
38
components/TempDesignSystem/Card/index.tsx
Normal file
@@ -0,0 +1,38 @@
|
||||
import { _ } from "@/lib/translation"
|
||||
|
||||
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 (
|
||||
<div 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}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user