95 lines
2.0 KiB
TypeScript
95 lines
2.0 KiB
TypeScript
import type { Block } from 'payload'
|
|
|
|
export const FDLocationsGridBlock: Block = {
|
|
slug: 'fdLocationsGrid',
|
|
imageURL: '/block-thumbnails/fd-places-grid.png',
|
|
imageAltText: 'FD Platser Grid',
|
|
interfaceName: 'FDLocationsGridBlock',
|
|
labels: {
|
|
singular: 'FD Platser Grid',
|
|
plural: 'FD Platser Grid',
|
|
},
|
|
fields: [
|
|
{
|
|
name: 'heading',
|
|
type: 'text',
|
|
localized: true,
|
|
label: 'Rubrik (valfri)',
|
|
},
|
|
{
|
|
name: 'description',
|
|
type: 'textarea',
|
|
localized: true,
|
|
label: 'Beskrivning (valfri)',
|
|
},
|
|
{
|
|
name: 'ctaText',
|
|
type: 'text',
|
|
localized: true,
|
|
label: 'CTA-knapp text (valfri)',
|
|
},
|
|
{
|
|
name: 'ctaLink',
|
|
type: 'text',
|
|
localized: true,
|
|
label: 'CTA-knapp länk',
|
|
defaultValue: '/kontakt',
|
|
},
|
|
{
|
|
name: 'cards',
|
|
type: 'array',
|
|
label: 'Platskort',
|
|
minRows: 1,
|
|
maxRows: 12,
|
|
fields: [
|
|
{
|
|
name: 'image',
|
|
type: 'upload',
|
|
relationTo: 'media',
|
|
required: true,
|
|
label: 'Platsbild',
|
|
},
|
|
{
|
|
name: 'locationName',
|
|
type: 'text',
|
|
localized: true,
|
|
required: true,
|
|
label: 'Platsnamn',
|
|
},
|
|
{
|
|
name: 'address',
|
|
type: 'text',
|
|
localized: true,
|
|
label: 'Adress',
|
|
},
|
|
{
|
|
name: 'link',
|
|
type: 'text',
|
|
label: 'Länk (valfri)',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'hoverColor',
|
|
type: 'select',
|
|
label: 'Hover-täckfärg',
|
|
defaultValue: 'navy',
|
|
options: [
|
|
{ label: 'Navy', value: 'navy' },
|
|
{ label: 'Gul', value: 'yellow' },
|
|
{ label: 'Mint', value: 'mint' },
|
|
],
|
|
},
|
|
{
|
|
name: 'sectionBackground',
|
|
type: 'select',
|
|
label: 'Sektionsbakgrund',
|
|
defaultValue: 'white',
|
|
options: [
|
|
{ label: 'Vit', value: 'white' },
|
|
{ label: 'Navy', value: 'navy' },
|
|
{ label: 'Grå', value: 'gray' },
|
|
],
|
|
},
|
|
],
|
|
} |