Skip to content

Commit 6b4e537

Browse files
committed
No more flickering styling
1 parent 64bd1eb commit 6b4e537

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

storyhelpers/storybook-readme/register.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ const Readme = props => {
3434

3535
if (syntaxHighlighters.length > 0) {
3636
for (const item of syntaxHighlighters) {
37-
item.style.display = 'none';
3837
const children = item.children;
3938
const parent = item.parentElement;
4039

@@ -59,7 +58,10 @@ const Readme = props => {
5958
<SyntaxHighlighter
6059
className="storybook-readme-syntax-highlighter"
6160
children={String(children).replace(/\n$/, '')}
62-
style={{ ...vs }}
61+
style={{
62+
...vs,
63+
'pre[class*="language-"]': { display: 'none' },
64+
}}
6365
language={match[1]}
6466
PreTag={'div'}
6567
{...props}

0 commit comments

Comments
 (0)