diff --git a/.storybook/helpers/createPopup.js b/.storybook/helpers/createPopup.js index 7c0917889..73456424c 100644 --- a/.storybook/helpers/createPopup.js +++ b/.storybook/helpers/createPopup.js @@ -31,6 +31,9 @@ function createPopup( model, layoutHint ) { if ( model.thumbnail ) { model.thumbnail = scaleDownThumbnail( model.thumbnail ); } + const extractNode = document.createElement( 'div' ); + extractNode.innerHTML = model.extract; + model.extract = extractNode.childNodes; const preview = createPreviewWithType( model ); const WINDOW_WIDTH = preview.isTall ? 500 : 500; @@ -112,7 +115,7 @@ function createPopup( model, layoutHint ) { pointerSize, WINDOW_HEIGHT ); - wrapper.appendChild( preview.el[ 0 ] ); + wrapper.appendChild( preview.el ); return wrapper.outerHTML; }