49 lines
958 B
TypeScript
49 lines
958 B
TypeScript
import type { Block } from 'payload'
|
|
|
|
export const FDContactBlock: Block = {
|
|
slug: 'fdContact',
|
|
interfaceName: 'FDContactBlock',
|
|
labels: {
|
|
singular: 'FD Cotact Us',
|
|
plural: 'FD Contact Uss',
|
|
},
|
|
fields: [
|
|
{
|
|
name: 'heading',
|
|
type: 'text',
|
|
required: true,
|
|
label: 'Rubrik',
|
|
defaultValue: 'Kontakta oss',
|
|
},
|
|
{
|
|
name: 'contactMethods',
|
|
type: 'array',
|
|
label: 'Kontaktmetoder',
|
|
minRows: 1,
|
|
maxRows: 6,
|
|
fields: [
|
|
{
|
|
name: 'label',
|
|
type: 'text',
|
|
required: true,
|
|
label: 'Etikett',
|
|
},
|
|
{
|
|
name: 'icon',
|
|
type: 'upload',
|
|
relationTo: 'media',
|
|
label: 'Ikon/bild',
|
|
},
|
|
{
|
|
name: 'link',
|
|
type: 'text',
|
|
label: 'Länk',
|
|
admin: {
|
|
description: 'tel:, mailto:, eller URL',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
],
|
|
}
|