@@ -2,13 +2,15 @@ import { css } from '@emotion/react';
22import type { Meta , StoryObj } from '@storybook/react-webpack5' ;
33import { productImage } from '../../fixtures/manual/productImage' ;
44import { ArticleDesign , ArticleDisplay , Pillar } from '../lib/articleFormat' ;
5+ import { extractHeadingText } from '../model/enhanceProductElement' ;
56import type { ProductBlockElement } from '../types/content' ;
67import { ProductCarouselCard } from './ProductCarouselCard' ;
78
89const product = {
910 _type : 'model.dotcomrendering.pageElements.ProductBlockElement' ,
1011 elementId : 'b1f6e8e2-3f3a-4f0c-8d1e-5f3e3e3e3e3e' ,
11- primaryHeadingHtml : 'Best Kettle overall' ,
12+ primaryHeadingHtml : '<em>Best Kettle overall:<em/>' ,
13+ primaryHeadingText : extractHeadingText ( '<em>Best Kettle overall:</em>' ) ,
1214 secondaryHeadingHtml : 'Bosch Sky Kettle' ,
1315 brandName : 'Bosch' ,
1416 productName : 'Sky Kettle' ,
@@ -277,7 +279,9 @@ export const WithLongHeadingProductNameAndCTA = {
277279 args : {
278280 product : {
279281 ...product ,
280- primaryHeadingHtml : 'Super long product category review name' ,
282+ primaryHeadingText : extractHeadingText (
283+ '<em>Super long product: category review name:</em>' ,
284+ ) ,
281285 productName :
282286 'Sky Kettle with a super duper long name that goes on and on' ,
283287 productCtas : [
0 commit comments