mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
fix(editor): Fix SQL editor issue (#7236)
Github issue / Community forum post (link here to close automatically):
This commit is contained in:
@@ -32,9 +32,14 @@ const cssStyleDeclaration = getComputedStyle(document.documentElement);
|
||||
interface ThemeSettings {
|
||||
isReadOnly?: boolean;
|
||||
customMaxHeight?: string;
|
||||
customMinHeight?: number;
|
||||
}
|
||||
|
||||
export const codeNodeEditorTheme = ({ isReadOnly, customMaxHeight }: ThemeSettings) => [
|
||||
export const codeNodeEditorTheme = ({
|
||||
isReadOnly,
|
||||
customMaxHeight,
|
||||
customMinHeight,
|
||||
}: ThemeSettings) => [
|
||||
EditorView.theme({
|
||||
'&': {
|
||||
'font-size': BASE_STYLING.fontSize,
|
||||
@@ -82,7 +87,9 @@ export const codeNodeEditorTheme = ({ isReadOnly, customMaxHeight }: ThemeSettin
|
||||
overflow: 'auto',
|
||||
|
||||
maxHeight: customMaxHeight ?? '100%',
|
||||
...(isReadOnly ? {} : { minHeight: '1.3em' }),
|
||||
...(isReadOnly
|
||||
? {}
|
||||
: { minHeight: customMinHeight ? `${Number(customMinHeight) * 1.3}em` : '10em' }),
|
||||
},
|
||||
'.cm-diagnosticAction': {
|
||||
backgroundColor: BASE_STYLING.diagnosticButton.backgroundColor,
|
||||
|
||||
Reference in New Issue
Block a user