"use client"; import PortableTextRenderer from "@/components/portable-text-renderer"; import { cn } from "@/lib/utils"; import { motion, useInView } from "motion/react"; import { useRef } from "react"; import { PAGE_QUERY_RESULT, ColorVariant } from "@/sanity.types"; type Block = NonNullable["blocks"]>[number]; type SplitRow = Extract; type SplitCardsList = Extract< NonNullable[number], { _type: "split-cards-list" } >; type SplitCardItem = NonNullable[number]>; interface SplitCardsItemProps extends SplitCardItem { color?: ColorVariant; } export default function SplitCardsItem({ color, tagLine, title, body, }: SplitCardsItemProps) { const ref = useRef(null); const isInView = useInView(ref, { amount: 1, }); return ( {tagLine && (
{tagLine}
)} {title && (
{title}
)} {body && (
)}
); }