import React from "react"; import { Grid, Cell } from "@faceless-ui/css-grid"; import { Page } from "../../../payload-types"; import RichText from "../../RichText"; import { Gutter } from "../../Gutter"; import { CMSLink } from "../../Link"; import classes from "./index.module.scss"; type Props = Extract; const Columns: React.FC = ({ layout, columnOne, columnTwo, columnThree, }) => { switch (layout) { case "oneColumn": { return ( {columnOne.enableLink && ( )} ); } case "halfAndHalf": case "twoThirdsOneThird": { let col1Cols = 6; let col2Cols = 6; if (layout === "twoThirdsOneThird") { col1Cols = 8; col2Cols = 4; } return ( {columnOne.enableLink && ( )} {columnTwo.enableLink && ( )} ); } case "threeColumns": { return ( {columnOne.enableLink && ( )} {columnTwo.enableLink && ( )} {columnThree.enableLink && ( )} ); } default: break; } return null; }; export const ContentBlock: React.FC = (props) => { return ( ); };