|
| 1 | +import { sectionFields } from "@/fields/sectionFields" |
1 | 2 | import type { Block } from "payload" |
2 | 3 |
|
3 | 4 | export const ActionListBlock: Block = { |
4 | 5 | slug: "actionList", |
5 | 6 | labels: { singular: "Action List", plural: "Action List Blocks" }, |
6 | 7 | fields: [ |
7 | | - { |
8 | | - type: "collapsible", |
9 | | - label: "Section", |
10 | | - fields: [ |
11 | | - { name: "sectionHeading", label: "Section Heading", type: "text", required: false, localized: true, defaultValue: "Actions" }, |
12 | | - { |
13 | | - name: "sectionLayout", |
14 | | - label: "Section Layout", |
15 | | - type: "select", |
16 | | - required: true, |
17 | | - defaultValue: "left", |
18 | | - options: [ |
19 | | - { label: "Center", value: "center" }, |
20 | | - { label: "Left", value: "left" }, |
21 | | - ], |
22 | | - }, |
23 | | - { name: "sectionDescription", label: "Section Description", type: "textarea", required: false, localized: true, defaultValue: "Browse available actions and integrations." }, |
24 | | - { |
25 | | - name: "sectionLinkButton", |
26 | | - label: "Section Link Button", |
27 | | - type: "group", |
28 | | - fields: [ |
29 | | - { name: "label", type: "text", required: false, localized: true }, |
30 | | - { name: "url", type: "text", required: false }, |
31 | | - ], |
32 | | - }, |
33 | | - ], |
34 | | - }, |
| 8 | + sectionFields({ |
| 9 | + headingDefaultValue: "Actions", |
| 10 | + descriptionDefaultValue: "Browse available actions and integrations.", |
| 11 | + layoutDefaultValue: "left", |
| 12 | + }), |
35 | 13 | { name: "searchPlaceholder", type: "text", required: true, localized: true, defaultValue: "Search actions" }, |
36 | 14 | { name: "sortNewestLabel", type: "text", required: true, localized: true, defaultValue: "Newest" }, |
37 | 15 | { name: "sortOldestLabel", type: "text", required: true, localized: true, defaultValue: "Oldest" }, |
|
0 commit comments