Skip to content

Commit c48cc74

Browse files
brynpttrsnBryan P.
andauthored
fix: syntaxhighlighter fill scrollbar width (#10887)
Co-authored-by: Bryan P. <bryanp.@iMac.lan>
1 parent 6efdf3b commit c48cc74

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

apps/website/src/components/DocItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export async function DocItem({
7575

7676
<Scrollbars className="border-base-neutral-200 dark:border-base-neutral-600 bg-base-neutral-100 dark:bg-base-neutral-900 rounded-sm border">
7777
<SyntaxHighlighter
78-
className="bg-[#f3f3f4] py-4 text-sm dark:bg-[#121214]"
78+
className="w-min bg-[#f3f3f4] py-4 text-sm dark:bg-[#121214]"
7979
code={node.sourceExcerpt}
8080
lang="typescript"
8181
/>

apps/website/src/components/DocNode.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ export async function DocNode({ node, version }: { readonly node?: any; readonly
7171
defer
7272
key={`${language}-${text}-${idx}`}
7373
>
74-
<SyntaxHighlighter className="bg-[#f3f3f4] py-4 text-sm dark:bg-[#121214]" code={text} lang={language} />
74+
<SyntaxHighlighter
75+
className="w-min bg-[#f3f3f4] py-4 text-sm dark:bg-[#121214]"
76+
code={text}
77+
lang={language}
78+
/>
7579
</Scrollbars>
7680
);
7781
}

0 commit comments

Comments
 (0)