mirror of
https://github.com/open-webui/docs.git
synced 2026-08-26 19:06:44 -04:00
style: fix prettier formatting
This commit is contained in:
@@ -176,8 +176,14 @@ const config: Config = {
|
||||
// copyright: `Copyright © ${new Date().getFullYear()} OpenWebUI`,
|
||||
},
|
||||
prism: {
|
||||
theme: { plain: { color: "#333", backgroundColor: "#f3f3f3" }, styles: [] },
|
||||
darkTheme: { plain: { color: "#ccc", backgroundColor: "#1a1a1a" }, styles: [] },
|
||||
theme: {
|
||||
plain: { color: "#333", backgroundColor: "#f3f3f3" },
|
||||
styles: [],
|
||||
},
|
||||
darkTheme: {
|
||||
plain: { color: "#ccc", backgroundColor: "#1a1a1a" },
|
||||
styles: [],
|
||||
},
|
||||
},
|
||||
} satisfies Preset.ThemeConfig,
|
||||
plugins: [require.resolve("docusaurus-lunr-search")],
|
||||
|
||||
+3
-1
@@ -241,7 +241,9 @@ code {
|
||||
border-radius: var(--ifm-global-radius);
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
transition: opacity 200ms ease-in-out, background-color 200ms ease-in-out;
|
||||
transition:
|
||||
opacity 200ms ease-in-out,
|
||||
background-color 200ms ease-in-out;
|
||||
}
|
||||
|
||||
[data-theme="light"] .shiki-copy-button {
|
||||
|
||||
@@ -5,7 +5,12 @@
|
||||
* String children → stock StringContent (Prism path, full Docusaurus UI).
|
||||
* Element children (Shiki) → lightweight wrapper with a standalone copy button.
|
||||
*/
|
||||
import React, { isValidElement, useState, useCallback, type ReactNode } from "react";
|
||||
import React, {
|
||||
isValidElement,
|
||||
useState,
|
||||
useCallback,
|
||||
type ReactNode,
|
||||
} from "react";
|
||||
import type { Props } from "@theme/CodeBlock";
|
||||
import useIsBrowser from "@docusaurus/useIsBrowser";
|
||||
import StringContent from "@theme/CodeBlock/Content/String";
|
||||
@@ -42,11 +47,25 @@ function CopyButton({ code }: { code: string }) {
|
||||
onClick={handleCopy}
|
||||
>
|
||||
{copied ? (
|
||||
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" strokeWidth="2">
|
||||
<svg
|
||||
viewBox="0 0 24 24"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
>
|
||||
<polyline points="20 6 9 17 4 12" />
|
||||
</svg>
|
||||
) : (
|
||||
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" strokeWidth="2">
|
||||
<svg
|
||||
viewBox="0 0 24 24"
|
||||
width="16"
|
||||
height="16"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
>
|
||||
<rect x="9" y="9" width="13" height="13" rx="2" ry="2" />
|
||||
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
|
||||
</svg>
|
||||
|
||||
Reference in New Issue
Block a user