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
61 lines
1.4 KiB
TypeScript
61 lines
1.4 KiB
TypeScript
import { MintelBlock } from "./types";
|
|
|
|
import type { Block } from "payload";
|
|
|
|
export const StatsDisplayBlock: MintelBlock = {
|
|
slug: "statsDisplay",
|
|
labels: {
|
|
singular: "Stats Display",
|
|
plural: "Stats Displays",
|
|
},
|
|
admin: {
|
|
group: "MDX Components",
|
|
},
|
|
ai: {
|
|
name: "StatsDisplay",
|
|
description:
|
|
"A single large stat card with prominent value, label, and optional subtext.",
|
|
usageExample:
|
|
'\'<StatsDisplay value="-20%" label="Conversion" subtext="Jede Sekunde Verzögerung kostet." />\'',
|
|
},
|
|
fields: [
|
|
{
|
|
name: "label",
|
|
type: "text",
|
|
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.",
|
|
},
|
|
},
|
|
{
|
|
name: "subtext",
|
|
type: "text",
|
|
admin: {
|
|
components: {
|
|
afterInput: [
|
|
"@mintel/payload-ai/components/AiFieldButton#AiFieldButton",
|
|
],
|
|
},
|
|
description: "Geben Sie den Text für subtext ein.",
|
|
},
|
|
},
|
|
],
|
|
};
|