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
103 lines
2.5 KiB
TypeScript
103 lines
2.5 KiB
TypeScript
import { MintelBlock } from "./types";
|
|
|
|
import type { Block } from "payload";
|
|
|
|
export const ComparisonRowBlock: MintelBlock = {
|
|
slug: "comparisonRow",
|
|
labels: {
|
|
singular: "Comparison Row",
|
|
plural: "Comparison Rows",
|
|
},
|
|
admin: {
|
|
group: "MDX Components",
|
|
},
|
|
ai: {
|
|
name: "ComparisonRow",
|
|
description:
|
|
'Side-by-side comparison: negative "Standard" approach vs positive "Mintel" approach. Props include showShare boolean.',
|
|
usageExample: `<ComparisonRow
|
|
description="Architektur-Vergleich"
|
|
negativeLabel="Legacy CMS"
|
|
negativeText="Langsame Datenbankabfragen, verwundbare Plugins."
|
|
positiveLabel="Mintel Stack"
|
|
positiveText="Statische Generierung, perfekte Sicherheit."
|
|
showShare={true`,
|
|
},
|
|
fields: [
|
|
{
|
|
name: "description",
|
|
type: "text",
|
|
admin: {
|
|
description: "Optional overarching description for the comparison.",
|
|
components: {
|
|
afterInput: [
|
|
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
|
|
],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
name: "negativeLabel",
|
|
type: "text",
|
|
required: true,
|
|
defaultValue: "Legacy",
|
|
admin: {
|
|
components: {
|
|
afterInput: [
|
|
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
|
|
],
|
|
},
|
|
description: "Geben Sie den Text für negativeLabel ein.",
|
|
},
|
|
},
|
|
{
|
|
name: "negativeText",
|
|
type: "text",
|
|
required: true,
|
|
admin: {
|
|
components: {
|
|
afterInput: [
|
|
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
|
|
],
|
|
},
|
|
description: "Geben Sie den Text für negativeText ein.",
|
|
},
|
|
},
|
|
{
|
|
name: "positiveLabel",
|
|
type: "text",
|
|
required: true,
|
|
defaultValue: "Mintel Stack",
|
|
admin: {
|
|
components: {
|
|
afterInput: [
|
|
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
|
|
],
|
|
},
|
|
description: "Geben Sie den Text für positiveLabel ein.",
|
|
},
|
|
},
|
|
{
|
|
name: "positiveText",
|
|
type: "text",
|
|
required: true,
|
|
admin: {
|
|
components: {
|
|
afterInput: [
|
|
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
|
|
],
|
|
},
|
|
description: "Geben Sie den Text für positiveText ein.",
|
|
},
|
|
},
|
|
{
|
|
name: "reverse",
|
|
type: "checkbox",
|
|
defaultValue: false,
|
|
admin: {
|
|
description: "Swap the visual order of the positive/negative cards?",
|
|
},
|
|
},
|
|
],
|
|
};
|