mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
Merge pull request #38771 from BerriAI/litellm_/api-reference-dark-mode-4ec67f
fix(ui): make code blocks follow the theme in dark mode
(cherry picked from commit e585aab3ea)
This commit is contained in:
parent
47ce15027b
commit
756e03c903
1 changed files with 4 additions and 3 deletions
|
|
@ -20,10 +20,10 @@ const CodeBlock = ({ code, language }: CodeBlockProps) => {
|
|||
};
|
||||
|
||||
return (
|
||||
<div className="relative rounded-lg border border-border overflow-hidden">
|
||||
<div className="relative rounded-lg border border-border bg-muted overflow-hidden">
|
||||
<button
|
||||
onClick={copyToClipboard}
|
||||
className="absolute top-3 right-3 p-2 rounded-md bg-muted hover:bg-accent text-muted-foreground z-10"
|
||||
className="absolute top-3 right-3 p-2 rounded-md border border-border bg-background text-muted-foreground hover:bg-accent hover:text-foreground z-10"
|
||||
aria-label="Copy code"
|
||||
>
|
||||
{copied ? <CheckIcon size={16} /> : <ClipboardIcon size={16} />}
|
||||
|
|
@ -36,8 +36,9 @@ const CodeBlock = ({ code, language }: CodeBlockProps) => {
|
|||
padding: "1.5rem",
|
||||
borderRadius: "0.5rem",
|
||||
fontSize: "0.9rem",
|
||||
backgroundColor: "#fafafa",
|
||||
background: "transparent",
|
||||
}}
|
||||
codeTagProps={{ style: { background: "transparent" } }}
|
||||
showLineNumbers
|
||||
>
|
||||
{code}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue