import React from "react"; import { Cell, Grid } from "@faceless-ui/css-grid"; import { Page } from "../../../payload-types"; import { BackgroundColor } from "../../BackgroundColor"; import { Gutter } from "../../Gutter"; import { CMSLink } from "../../Link"; import RichText from "../../RichText"; import classes from "./index.module.scss"; type Props = { ctaBackgroundColor?: "white" | "black"; richText: { [k: string]: unknown; }[]; links: { link: { type?: "reference" | "custom"; newTab?: boolean; reference: { value: string | Page; relationTo: "pages"; }; url: string; label: string; }; id?: string; }[]; id?: string; blockName?: string; blockType: "cta"; }; export const CallToActionBlock: React.FC = ({ ctaBackgroundColor, links, richText, }) => { const oppositeBackgroundColor = ctaBackgroundColor === "white" ? "black" : "white"; return (
{(links || []).map(({ link }, i) => { return ; })}
); };