Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 6s
Build & Deploy / 🧪 QA (push) Failing after 1m24s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
98 lines
2.5 KiB
TypeScript
98 lines
2.5 KiB
TypeScript
import { MintelBlock } from "./types";
|
|
|
|
import type { Block } from "payload";
|
|
|
|
export const ArticleQuoteBlock: MintelBlock = {
|
|
slug: "articleQuote",
|
|
labels: {
|
|
singular: "Article Quote",
|
|
plural: "Article Quotes",
|
|
},
|
|
admin: {
|
|
group: "MDX Components",
|
|
},
|
|
ai: {
|
|
name: "ArticleQuote",
|
|
description:
|
|
"Dark-themed quote card. Use for expert quotes or statements. Use isCompany={true} for brands/orgs to show an entity icon instead of personal initials. MANDATORY: always include source and sourceUrl for verifiability. Props: quote, author, role (optional), source (REQUIRED), sourceUrl (REQUIRED), isCompany (optional), translated (optional boolean).",
|
|
usageExample:
|
|
'\'<ArticleQuote quote="Optimizing for speed." author="Google" isCompany={true',
|
|
},
|
|
fields: [
|
|
{
|
|
name: "quote",
|
|
type: "textarea",
|
|
required: true,
|
|
admin: {
|
|
components: {
|
|
afterInput: [
|
|
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
|
|
],
|
|
},
|
|
description: "Geben Sie den mehrzeiligen Text für quote ein.",
|
|
},
|
|
},
|
|
{
|
|
name: "author",
|
|
type: "text",
|
|
required: true,
|
|
admin: {
|
|
components: {
|
|
afterInput: [
|
|
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
|
|
],
|
|
},
|
|
description: "Geben Sie den Text für author ein.",
|
|
},
|
|
},
|
|
{
|
|
name: "role",
|
|
type: "text",
|
|
admin: {
|
|
components: {
|
|
afterInput: [
|
|
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
|
|
],
|
|
},
|
|
description: "Geben Sie den Text für role ein.",
|
|
},
|
|
},
|
|
{
|
|
name: "source",
|
|
type: "text",
|
|
admin: {
|
|
components: {
|
|
afterInput: [
|
|
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
|
|
],
|
|
},
|
|
description: "Geben Sie den Text für source ein.",
|
|
},
|
|
},
|
|
{
|
|
name: "sourceUrl",
|
|
type: "text",
|
|
admin: {
|
|
components: {
|
|
afterInput: [
|
|
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
|
|
],
|
|
},
|
|
description: "Geben Sie den Text für sourceUrl ein.",
|
|
},
|
|
},
|
|
{
|
|
name: "translated",
|
|
type: "checkbox",
|
|
defaultValue: false,
|
|
admin: { description: "Wert für translated eingeben." },
|
|
},
|
|
{
|
|
name: "isCompany",
|
|
type: "checkbox",
|
|
defaultValue: false,
|
|
admin: { description: "Wert für isCompany eingeben." },
|
|
},
|
|
],
|
|
};
|