wwwlayermeshusa/src/blocks/FDPartnersLogosBlock/config.ts
2026-02-20 17:34:24 +01:00

74 lines
1.7 KiB
TypeScript

import type { Block } from 'payload'
export const FDPartnersLogosBlock: Block = {
slug: 'fdPartnersLogos',
imageURL: '/block-thumbnails/fd-partners-logos.png',
imageAltText: 'FD Partnerlogotyper',
interfaceName: 'FDPartnersLogosBlock',
labels: {
singular: 'FD Partnerlogotyper',
plural: 'FD Partnerlogotyper',
},
fields: [
{
name: 'heading',
type: 'text',
localized: true,
label: 'Rubrik (valfri)',
defaultValue: 'Våra partners',
},
{
name: 'logos',
type: 'array',
label: 'Logotyper',
minRows: 1,
fields: [
{
name: 'image',
type: 'upload',
relationTo: 'media',
required: true,
label: 'Logotyp',
},
{
name: 'alt',
type: 'text',
localized: true,
label: 'Alt-text',
admin: {
description: 'Beskrivning av logotypen (tillgänglighet)',
},
},
{
name: 'link',
type: 'text',
label: 'Länk (valfri)',
admin: {
description: 'URL till partnerns webbplats',
},
},
],
},
{
name: 'displayMode',
type: 'select',
label: 'Visningsläge',
defaultValue: 'color',
options: [
{ label: 'Färg', value: 'color' },
{ label: 'Svartvit (färg vid hover)', value: 'monochrome' },
],
},
{
name: 'sectionBackground',
type: 'select',
label: 'Sektionsbakgrund',
defaultValue: 'gray',
options: [
{ label: 'Vit', value: 'white' },
{ label: 'Ljusgrå', value: 'gray' },
{ label: 'Navy', value: 'navy' },
],
},
],
}