feat: add validation to enter details flow

This commit is contained in:
Christel Westerberg
2024-10-10 07:40:34 +02:00
parent 1bce311666
commit c9684dee11
17 changed files with 357 additions and 117 deletions

View File

@@ -53,6 +53,7 @@ a.inverted {
a.text {
background: none;
border: none;
outline: none;
}
/* VARIANTS */

View File

@@ -1,5 +1,7 @@
"use client"
import { useFormContext } from "react-hook-form"
import { CheckIcon, CloseIcon, HeartIcon } from "@/components/Icons"
import Caption from "@/components/TempDesignSystem/Text/Caption"
import Footnote from "@/components/TempDesignSystem/Text/Footnote"
@@ -23,6 +25,8 @@ export default function Card({
type,
value,
}: CardProps) {
const { register } = useFormContext()
return (
<label className={styles.label} data-declined={declined}>
<Caption className={styles.title} textTransform="bold" uppercase>
@@ -68,9 +72,9 @@ export default function Card({
aria-hidden
id={id || name}
hidden
name={name}
type={type}
value={value}
{...register(name)}
/>
</label>
)