feat: loosen up the zod validations and return null instead of throwing
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Divider from "@/components/TempDesignSystem/Divider"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import BiroScript from "@/components/TempDesignSystem/Text/BiroScript"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import Title from "@/components/TempDesignSystem/Text/Title"
|
||||
|
||||
import { cardVariants } from "./variants"
|
||||
@@ -42,13 +44,20 @@ export default function Card({
|
||||
>
|
||||
{scriptedTopTitle ? (
|
||||
<section className={styles.scriptContainer}>
|
||||
<h3 className={styles.scriptedTitle}>{scriptedTopTitle}</h3>
|
||||
<BiroScript className={styles.scriptedTitle} type="two">
|
||||
{scriptedTopTitle}
|
||||
</BiroScript>
|
||||
<Divider />
|
||||
</section>
|
||||
) : null}
|
||||
<Title as="h5" className={styles.heading} level="h3">
|
||||
{heading}
|
||||
</Title>
|
||||
{bodyText ? <p className={styles.bodyText}>{bodyText}</p> : null}
|
||||
{bodyText ? (
|
||||
<Body className={styles.bodyText} textAlign="center">
|
||||
{bodyText}
|
||||
</Body>
|
||||
) : null}
|
||||
<div className={styles.buttonContainer}>
|
||||
{primaryButton ? (
|
||||
<Button asChild theme={buttonTheme} size="small">
|
||||
|
||||
Reference in New Issue
Block a user