[fix] fix ltr layout for codeblock
This commit is contained in:
@@ -22,7 +22,13 @@ const PreWrapper = ({ children }: { children: JSX.Element }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
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 && (
|
{hovered && (
|
||||||
<Button
|
<Button
|
||||||
aria-label="Copy code"
|
aria-label="Copy code"
|
||||||
@@ -33,10 +39,7 @@ const PreWrapper = ({ children }: { children: JSX.Element }) => {
|
|||||||
{copied ? <FaCheck /> : <IoCopyOutline />}
|
{copied ? <FaCheck /> : <IoCopyOutline />}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
<pre
|
<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">
|
||||||
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"
|
|
||||||
>
|
|
||||||
{children}
|
{children}
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user