Files
mintel.me/apps/web/src/payload/blocks/StatsGridBlock.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

57 lines
1.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { MintelBlock } from "./types";
import type { Block } from "payload";
export const StatsGridBlock: MintelBlock = {
slug: "statsGrid",
labels: {
singular: "Stats Grid",
plural: "Stats Grids",
},
admin: {
group: "MDX Components",
},
ai: {
name: "StatsGrid",
description:
"Grid of 24 stat cards in a row. Use tilde (~) to separate stats, pipe (|) to separate value|label|subtext within each stat.",
usageExample:
"'<StatsGrid stats=\"53%|Mehr Umsatz|Rakuten 24~33%|Conversion Boost|nach CWV Fix~24%|Top 3 Ranking|bei bestandenen CWV\" />'",
},
fields: [
{
name: "stats",
type: "array",
fields: [
{
name: "label",
type: "text",
required: true,
admin: {
components: {
afterInput: [
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
],
},
description: "Geben Sie den Text für label ein.",
},
},
{
name: "value",
type: "text",
required: true,
admin: {
components: {
afterInput: [
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
],
},
description: "Geben Sie den Text für value ein.",
},
},
],
admin: { description: "Fügen Sie Elemente zur Liste stats hinzu." },
},
],
};