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
55 lines
1.3 KiB
TypeScript
55 lines
1.3 KiB
TypeScript
import { MintelBlock } from "./types";
|
|
import type { Block } from "payload";
|
|
|
|
export const ArticleMemeBlock: MintelBlock = {
|
|
slug: "articleMeme",
|
|
labels: {
|
|
singular: "Article Meme",
|
|
plural: "Article Memes",
|
|
},
|
|
admin: {
|
|
group: "MDX Components",
|
|
},
|
|
ai: {
|
|
name: "ArticleMeme",
|
|
description:
|
|
"Real image-based meme from the media library. Use for static screenshots or custom memes that are not available via memegen.link.",
|
|
usageExample:
|
|
'<ArticleMeme image="/media/my-meme.png" alt="Sarcastic dev meme" caption="When the code finally builds." />',
|
|
},
|
|
fields: [
|
|
{
|
|
name: "image",
|
|
type: "upload",
|
|
relationTo: "media",
|
|
required: true,
|
|
admin: { description: "Laden Sie die Datei für image hoch." },
|
|
},
|
|
{
|
|
name: "alt",
|
|
type: "text",
|
|
required: true,
|
|
admin: {
|
|
components: {
|
|
afterInput: [
|
|
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
|
|
],
|
|
},
|
|
description: "Geben Sie den Text für alt ein.",
|
|
},
|
|
},
|
|
{
|
|
name: "caption",
|
|
type: "text",
|
|
admin: {
|
|
components: {
|
|
afterInput: [
|
|
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
|
|
],
|
|
},
|
|
description: "Geben Sie den Text für caption ein.",
|
|
},
|
|
},
|
|
],
|
|
};
|