134 lines
3.1 KiB
TypeScript
134 lines
3.1 KiB
TypeScript
import type { Block } from 'payload'
|
|
|
|
export const FDPricingCardBlock: Block = {
|
|
slug: 'fdPricingCard',
|
|
interfaceName: 'FDPricingCardBlock',
|
|
labels: {
|
|
singular: 'FD Priskort',
|
|
plural: 'FD Priskort',
|
|
},
|
|
fields: [
|
|
{
|
|
name: 'sectionTitle',
|
|
type: 'text',
|
|
localized: true,
|
|
label: 'Blockrubrik (valfri)',
|
|
admin: {
|
|
description: 'Stor rubrik ovanför korten',
|
|
},
|
|
},
|
|
{
|
|
name: 'cards',
|
|
type: 'array',
|
|
label: 'Kort',
|
|
minRows: 1,
|
|
maxRows: 3,
|
|
fields: [
|
|
{
|
|
name: 'title',
|
|
type: 'text',
|
|
localized: true,
|
|
required: true,
|
|
label: 'Titel',
|
|
admin: {
|
|
description: 'T.ex. produktnamn eller tjänstenamn',
|
|
},
|
|
},
|
|
{
|
|
name: 'subtitle',
|
|
type: 'text',
|
|
localized: true,
|
|
label: 'Undertitel',
|
|
admin: {
|
|
description: 'T.ex. pris: "från 640 kr/mån"',
|
|
},
|
|
},
|
|
{
|
|
name: 'description',
|
|
type: 'textarea',
|
|
localized: true,
|
|
label: 'Beskrivning',
|
|
},
|
|
{
|
|
name: 'bulletPoints',
|
|
type: 'array',
|
|
label: 'Punktlista',
|
|
fields: [
|
|
{
|
|
name: 'text',
|
|
type: 'text',
|
|
localized: true,
|
|
required: true,
|
|
label: 'Punkt',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'ctaText',
|
|
type: 'text',
|
|
localized: true,
|
|
label: 'CTA-knapp text',
|
|
defaultValue: 'Få offert',
|
|
},
|
|
{
|
|
name: 'ctaLink',
|
|
type: 'text',
|
|
label: 'CTA-knapp länk',
|
|
defaultValue: '/kontakt',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
name: 'cardStyle',
|
|
type: 'select',
|
|
label: 'Kortstil',
|
|
defaultValue: 'outlined',
|
|
options: [
|
|
{ label: 'Kontur (vit med ram)', value: 'outlined' },
|
|
{ label: 'Navy', value: 'navy' },
|
|
{ label: 'Grå', value: 'gray' },
|
|
{ label: 'Gul', value: 'yellow' },
|
|
{ label: 'Vit (skugga)', value: 'white' },
|
|
],
|
|
},
|
|
{
|
|
name: 'buttonColor',
|
|
type: 'select',
|
|
label: 'Knappfärg',
|
|
defaultValue: 'yellow',
|
|
options: [
|
|
{ label: 'Gul', value: 'yellow' },
|
|
{ label: 'Navy', value: 'navy' },
|
|
{ label: 'Kontur (navy ram)', value: 'outlinedNavy' },
|
|
{ label: 'Kontur (vit ram)', value: 'outlinedWhite' },
|
|
],
|
|
},
|
|
{
|
|
name: 'sectionBackground',
|
|
type: 'select',
|
|
label: 'Sektionsbakgrund',
|
|
defaultValue: 'white',
|
|
options: [
|
|
{ label: 'Vit', value: 'white' },
|
|
{ label: 'Navy', value: 'navy' },
|
|
{ label: 'Grå', value: 'gray' },
|
|
{ label: 'Gul', value: 'yellow' },
|
|
],
|
|
},
|
|
{
|
|
name: 'titleColor',
|
|
type: 'select',
|
|
label: 'Rubrikfärg',
|
|
defaultValue: 'navy',
|
|
admin: {
|
|
description: 'Färg på blockrubriken',
|
|
},
|
|
options: [
|
|
{ label: 'Navy', value: 'navy' },
|
|
{ label: 'Vit', value: 'white' },
|
|
{ label: 'Gul', value: 'yellow' },
|
|
],
|
|
},
|
|
],
|
|
}
|