fix(docs): codeblock flickering issue (#5849)

* fix: updated codeblock component to prevent flicker when scrolling

* fix(codeblock): revert className and style handling

* fix(codeblock): clean up className handling and remove unnecessary styles

* chore(docs): format

---------

Co-authored-by: WK Wong <wingkwong.code@gmail.com>
This commit is contained in:
Vilas Chauvhan 2025-11-01 16:03:02 +05:30 committed by GitHub
parent 1782961859
commit 27fec2db3c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -124,16 +124,10 @@ const CodeBlockHighlight = ({
preRef.current = element;
}
}}
className={clsx(
className,
classNameProp,
`language-${codeLang}`,
"max-w-full contents",
{
"flex-col": isMultiLine,
"overflow-x-scroll scrollbar-hide": hideScrollBar,
},
)}
className={clsx(className, classNameProp, `language-${codeLang}`, "max-w-full", {
"flex-col": isMultiLine,
"overflow-x-scroll scrollbar-hide": hideScrollBar,
})}
data-language={language}
style={style}
>