import React from "react"; import { TinaMarkdown } from "tinacms/dist/rich-text"; import { Buttons } from "./buttons"; const buttonAlignment = (alignment) => { const alignmentClasses: string[] = alignment?.split(" ").filter(item => item.includes("text-")) || [] const textAlignments = { "text-left": "", "text-center": "mx-auto", "text-right": "ml-auto", "sm:text-left": "sm:ml-0 sm:mr-auto", "sm:text-center": "sm:mx-auto", "sm:text-right": "sm:ml-auto sm:mr-0", }; return alignmentClasses.map(item => textAlignments[item]).join(' ') }; export const Content = ({ data, styles, alignment, width, parentField, className = "" }) => { // The first block gets an h1, others get an h2 const headlineElement = () => { if (data?.headline && parentField === 'blocks.0') { return