button and spacer block

visual changes
This commit is contained in:
Jakub Dorfman 2026-05-20 15:10:52 +02:00
parent 1b3ef17800
commit 5a0ffe20df
11 changed files with 190 additions and 22 deletions

View file

@ -5,7 +5,9 @@ export const blockLabels: Record<BlockType, string> = {
text: 'Text',
image_text: 'Image + Text',
timeline: 'Timeline',
hero: 'Hero'
hero: 'Hero',
button: 'Button',
spacer: 'Spacer'
};
export const blockTypes = Object.keys(blockLabels) as BlockType[];
@ -27,10 +29,21 @@ export function createBlock(type: BlockType): ContentBlock {
heading: 'Holistic and Experiential Learning about Happiness',
subheading: 'Individual sessions, workshops and events in Oslo',
buttonLabel: 'BOOK NOW',
buttonUrl: '/book',
backgroundImage: ''
buttonUrl: '/book'
};
break;
case 'button':
base.data = {
label: 'Learn More',
href: '/',
variant: 'primary',
size: 'md',
alignment: 'center'
};
break;
case 'spacer':
base.data = { height: 64 };
break;
}
base.data._background = { type: 'none', color: '', imageUrl: '', attachment: 'scroll', overlay: false, overlayOpacity: 40 };
return base;