mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-16 04:35:24 +02:00
Merge pull request #2167 from croatialu/fix/traefik-config-editor-mask
fix: Optimize the code editor component, adjust the style and structu…
This commit is contained in:
@@ -147,7 +147,7 @@ export const CodeEditor = ({
|
|||||||
}: Props) => {
|
}: Props) => {
|
||||||
const { resolvedTheme } = useTheme();
|
const { resolvedTheme } = useTheme();
|
||||||
return (
|
return (
|
||||||
<div className={cn("relative overflow-auto", wrapperClassName)}>
|
<div className={cn("overflow-auto", wrapperClassName)}>
|
||||||
<CodeMirror
|
<CodeMirror
|
||||||
basicSetup={{
|
basicSetup={{
|
||||||
lineNumbers,
|
lineNumbers,
|
||||||
@@ -175,14 +175,15 @@ export const CodeEditor = ({
|
|||||||
{...props}
|
{...props}
|
||||||
editable={!props.disabled}
|
editable={!props.disabled}
|
||||||
className={cn(
|
className={cn(
|
||||||
"w-full h-full text-sm leading-relaxed",
|
"w-full h-full text-sm leading-relaxed relative",
|
||||||
`cm-theme-${resolvedTheme}`,
|
`cm-theme-${resolvedTheme}`,
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
/>
|
>
|
||||||
{props.disabled && (
|
{props.disabled && (
|
||||||
<div className="absolute top-0 rounded-md left-0 w-full h-full flex items-center justify-center z-[10] [background:var(--overlay)] h-full" />
|
<div className="absolute top-0 rounded-md left-0 w-full h-full flex items-center justify-center z-[10] [background:var(--overlay)] h-full" />
|
||||||
)}
|
)}
|
||||||
|
</CodeMirror>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user