[fix] fix ltr layout for codeblock
This commit is contained in:
@@ -22,7 +22,13 @@ const PreWrapper = ({ children }: { children: JSX.Element }) => {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="relative flat-scrollbar-normal" onMouseLeave={onExit} onMouseMove={onEnter} ref={textInput}>
|
||||
<div
|
||||
className="relative flat-scrollbar-normal"
|
||||
dir="ltr"
|
||||
onMouseLeave={onExit}
|
||||
onMouseMove={onEnter}
|
||||
ref={textInput}
|
||||
>
|
||||
{hovered && (
|
||||
<Button
|
||||
aria-label="Copy code"
|
||||
@@ -33,10 +39,7 @@ const PreWrapper = ({ children }: { children: JSX.Element }) => {
|
||||
{copied ? <FaCheck /> : <IoCopyOutline />}
|
||||
</Button>
|
||||
)}
|
||||
<pre
|
||||
className="p-2 dark:bg-[#0d1117] bg-[#F6F8FA] rounded-md flat-scrollbar-normal not-prose text-sm dark:selection:bg-gray-700 selection:bg-gray-300 selection:text-inherit"
|
||||
dir="ltr"
|
||||
>
|
||||
<pre className="p-2 dark:bg-[#0d1117] bg-[#F6F8FA] rounded-md flat-scrollbar-normal not-prose text-sm dark:selection:bg-gray-700 selection:bg-gray-300 selection:text-inherit">
|
||||
{children}
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user