Skip to content

Commit f2fa6fa

Browse files
committed
fix block style previews
1 parent e5fce6c commit f2fa6fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/style-guide/utils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,12 @@ export const RenderBlock = props => {
296296

297297
return (
298298
<>
299+
{ /* Insert the label as a string inside RawHTML so that it appears within
300+
the <div> wrapper that RawHTML generates, ensuring proper structure. */ }
299301
<RawHTML>
300302
{ cleanSerializedBlock( serialized, SERIALIZE_CALLBACKS[ blockName ], attributes ) }
303+
{ `<p>${ name }</p>` }
301304
</RawHTML>
302-
<p>{ name }</p>
303305
</>
304306
)
305307
}

0 commit comments

Comments
 (0)