feat: loosen up the zod validations and return null instead of throwing

This commit is contained in:
Simon Emanuelsson
2024-06-07 10:36:23 +02:00
parent 5c50ac060d
commit aca9221ea6
89 changed files with 1117 additions and 821 deletions
+11 -2
View File
@@ -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">