Files
mintel.me/apps/web/src/payload/blocks/RevealBlock.ts
Marc Mintel 6864903cff
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 10s
Build & Deploy / 🧪 QA (push) Failing after 2m24s
Build & Deploy / 🏗️ Build (push) Failing after 3m40s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🩺 Health Check (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 3s
fix(web): remove redundant prop-types and unblock lint pipeline
2026-02-24 11:38:43 +01:00

52 lines
1.3 KiB
TypeScript

import { MintelBlock } from "./types";
import type { Block } from "payload";
import { lexicalEditor } from "@payloadcms/richtext-lexical";
export const RevealBlock: MintelBlock = {
slug: "mintelReveal",
labels: {
singular: "Reveal Wrap",
plural: "Reveal Wraps",
},
admin: {
group: "MDX Components",
},
ai: {
name: "Reveal",
description:
"Scroll-triggered reveal animation wrapper. Wrap any content to animate on scroll.",
usageExample:
'\'<Reveal>\n <StatsDisplay value="100" label="PageSpeed Score" />\n</Reveal>\'',
},
fields: [
{
name: "direction",
type: "select",
options: [
{ label: "Up", value: "up" },
{ label: "Down", value: "down" },
{ label: "Left", value: "left" },
{ label: "Right", value: "right" },
],
defaultValue: "up",
admin: { description: "Wählen Sie eine Option für direction aus." },
},
{
name: "delay",
type: "number",
defaultValue: 0.1,
admin: {
description: "Tragen Sie einen numerischen Wert für delay ein.",
},
},
{
name: "content",
type: "richText",
editor: lexicalEditor({}),
required: true,
admin: { description: "Formatierter Textbereich für content." },
},
],
};