import { useBlock } from '../../Provider'; import { BaseBlock } from '../BaseBlock'; import { BlocksList, BlocksListConfig } from '../BlocksList'; import { BaseBlockConfig } from '../types'; export interface HeroConfig extends BaseBlockConfig { title: string; lead: string; content?: BlocksListConfig; img: string; backgroundColor: string; level: 1 | 2 | 3 | 4 | 5 | 6; } interface HeroProps extends HeroConfig {} export const Hero = ({ className, title, lead, content, img, backgroundColor, level = 2, }: HeroProps) => { const H = `h${level}` as keyof JSX.IntrinsicElements; return (
{lead}
{content &&