wwwfiberdirekt/src/blocks/FDUspChecklistBlock/config.ts
2026-02-20 14:50:21 +01:00

85 lines
1.9 KiB
TypeScript

import type { Block } from 'payload'
export const FDUspChecklistBlock: Block = {
slug: 'fdUspChecklist',
imageURL: '/block-thumbnails/fd-usp-checklist.png',
imageAltText: 'FD USP-checklista',
interfaceName: 'FDUspChecklistBlock',
labels: {
singular: 'FD USP-checklista',
plural: 'FD USP-checklistor',
},
fields: [
{
name: 'heading',
type: 'text',
localized: true,
label: 'Rubrik',
required: true,
},
{
name: 'items',
type: 'array',
label: 'Punkter',
minRows: 1,
fields: [
{
name: 'text',
type: 'text',
localized: true,
required: true,
label: 'Text',
},
],
},
{
name: 'image',
type: 'upload',
relationTo: 'media',
label: 'Bild (valfri)',
},
{
name: 'imagePosition',
type: 'select',
label: 'Bildplacering',
defaultValue: 'right',
options: [
{ label: 'Höger', value: 'right' },
{ label: 'Vänster', value: 'left' },
],
},
{
name: 'checkColor',
type: 'select',
label: 'Checkikon-färg',
defaultValue: 'navy',
options: [
{ label: 'Navy (vit bock)', value: 'navy' },
{ label: 'Gul (navy bock)', value: 'yellow' },
{ label: 'Grå (navy bock)', value: 'gray' },
],
},
{
name: 'sectionBackground',
type: 'select',
label: 'Sektionsbakgrund',
defaultValue: 'white',
options: [
{ label: 'Vit', value: 'white' },
{ label: 'Grå', value: 'gray' },
{ label: 'Navy', value: 'navy' },
],
},
{
name: 'textColor',
type: 'select',
label: 'Textfärg',
defaultValue: 'navy',
options: [
{ label: 'Navy', value: 'navy' },
{ label: 'Vit', value: 'white' },
],
},
],
}