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
82 lines
2.2 KiB
TypeScript
82 lines
2.2 KiB
TypeScript
import { MintelBlock } from "./types";
|
|
|
|
import type { Block } from "payload";
|
|
|
|
export const LeadMagnetBlock: MintelBlock = {
|
|
slug: "leadMagnet",
|
|
labels: {
|
|
singular: "Lead Magnet CTA",
|
|
plural: "Lead Magnet CTAs",
|
|
},
|
|
admin: {
|
|
group: "MDX Components",
|
|
},
|
|
ai: {
|
|
name: "LeadMagnet",
|
|
description:
|
|
"Premium B2B conversion card. Use 1-2 per article as main high-impact CTAs. Props: title (strong headline), description (value prop), buttonText (action), href (link), variant (performance|security|standard).",
|
|
usageExample:
|
|
'\'<LeadMagnet title="Performance-Check anfragen" description="Wir analysieren Ihre Core Web Vitals und decken Umsatzpotenziale auf." buttonText="Jetzt analysieren lassen" href="/contact" variant="performance" />\'',
|
|
},
|
|
fields: [
|
|
{
|
|
name: "title",
|
|
type: "text",
|
|
required: true,
|
|
admin: {
|
|
description: "The strong headline for the Call-to-Action",
|
|
components: {
|
|
afterInput: [
|
|
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
|
|
],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
name: "description",
|
|
type: "text",
|
|
required: true,
|
|
admin: {
|
|
description: "The value proposition text.",
|
|
components: {
|
|
afterInput: [
|
|
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
|
|
],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
name: "buttonText",
|
|
type: "text",
|
|
required: true,
|
|
defaultValue: "Jetzt anfragen",
|
|
admin: {
|
|
components: {
|
|
afterInput: [
|
|
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
|
|
],
|
|
},
|
|
description: "Geben Sie den Text für buttonText ein.",
|
|
},
|
|
},
|
|
{
|
|
name: "href",
|
|
type: "text",
|
|
required: true,
|
|
defaultValue: "/contact",
|
|
admin: { description: "Geben Sie den Text für href ein." },
|
|
},
|
|
{
|
|
name: "variant",
|
|
type: "select",
|
|
options: [
|
|
{ label: "Performance", value: "performance" },
|
|
{ label: "Security", value: "security" },
|
|
{ label: "Standard", value: "standard" },
|
|
],
|
|
defaultValue: "standard",
|
|
admin: { description: "Wählen Sie eine Option für variant aus." },
|
|
},
|
|
],
|
|
};
|