diff --git a/components/StoryBlok/PageHeaderBlok/PageHeaderBlok.tsx b/components/StoryBlok/PageHeaderBlok/PageHeaderBlok.tsx index 5220fdd..0841ace 100644 --- a/components/StoryBlok/PageHeaderBlok/PageHeaderBlok.tsx +++ b/components/StoryBlok/PageHeaderBlok/PageHeaderBlok.tsx @@ -3,13 +3,22 @@ import { Box, Button, Heading, Text } from '@chakra-ui/react' import { BlokType, IPageHeader } from '../../../lib/storyblok/types' import { storyblokEditable } from '@storyblok/react' import { Contained } from 'components/Contained/Contained' +import Image from 'next/image' export default function PageHeaderBlok({ blok, }: { blok: BlokType }): ReactElement { - const { title, align = 'left', subtitle, image, height, action_label } = blok + const { + title, + align = 'left', + subtitle, + image, + height, + action_label, + prefix = '', + } = blok return ( - + {prefix && ( + <> + + {prefix} + + + )} + {title} {subtitle && ( - + {subtitle} )} diff --git a/lib/storyblok/types.ts b/lib/storyblok/types.ts index fc7d048..7a20ba3 100644 --- a/lib/storyblok/types.ts +++ b/lib/storyblok/types.ts @@ -106,6 +106,7 @@ export interface ITeaser { export interface IPageHeader { title: string + prefix?: string subtitle?: string align?: 'center' | 'left' image?: ImageField