Files
mintel.me/apps/web/src/payload/blocks/ExternalLinkBlock.ts
Marc Mintel b2f6627ec5
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
refactor(payload): extract ai extensions to @mintel/payload-ai package
2026-03-02 23:00:50 +01:00

43 lines
1.0 KiB
TypeScript

import { MintelBlock } from "./types";
import type { Block } from "payload";
export const ExternalLinkBlock: MintelBlock = {
slug: "externalLink",
labels: {
singular: "External Link",
plural: "External Links",
},
admin: {
group: "MDX Components",
},
ai: {
name: "ExternalLink",
description:
"Inline external link with ↗ icon and outbound analytics tracking. Use for all source citations and external references within Paragraph text.",
usageExample:
"'<ExternalLink href=\"https://web.dev/articles/vitals\">Google Core Web Vitals</ExternalLink>'",
},
fields: [
{
name: "href",
type: "text",
required: true,
admin: { description: "Geben Sie den Text für href ein." },
},
{
name: "label",
type: "text",
required: true,
admin: {
components: {
afterInput: [
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
],
},
description: "Geben Sie den Text für label ein.",
},
},
],
};