import React from "react"; import { Container } from "../util/container"; import { Section } from "../util/section"; import type { Template } from "tinacms"; import { PageBlocksTestimonial } from "../../tina/__generated__/types"; import { tinaField } from "tinacms/dist/react"; export const Testimonial = ({ data }: { data: PageBlocksTestimonial }) => { return (

{ data.quote }

); }; export const testimonialBlockSchema: Template = { name: "testimonial", label: "Testimonial", ui: { previewSrc: "/blocks/testimonial.png", defaultItem: { quote: "There are only two hard things in Computer Science: cache invalidation and naming things.", author: "Phil Karlton", color: "primary" } }, fields: [ { type: "string", ui: { component: "textarea" }, label: "Quote", name: "quote" }, { type: "string", label: "Author", name: "author" }, { type: "string", label: "Color", name: "color", options: [ { label: "Default", value: "default" }, { label: "Tint", value: "tint" }, { label: "Primary", value: "primary" } ] } ] };