@fc-components/monaco-editor 0.1.20 → 0.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import type * as monacoTypes from 'monaco-editor/esm/vs/editor/editor.api';
3
3
  import type { DataProviderParams } from './types';
4
4
  interface PromQLEditorProps {
5
+ className?: string;
5
6
  size?: 'small' | 'middle' | 'large';
6
7
  theme?: 'light' | 'dark';
7
8
  value?: string;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.1.20",
6
+ "version": "0.1.21",
7
7
  "license": "MIT",
8
8
  "main": "dist/index.js",
9
9
  "module": "dist/monaco-editor.esm.js",
@@ -14,6 +14,7 @@ import type { DataProviderParams } from './types';
14
14
  import { validateQuery } from './validation';
15
15
 
16
16
  interface PromQLEditorProps {
17
+ className?: string;
17
18
  size?: 'small' | 'middle' | 'large';
18
19
  theme?: 'light' | 'dark';
19
20
  value?: string;
@@ -88,6 +89,7 @@ const getStyles = (placeholder?: string) => {
88
89
  export default function PromQLEditor(props: PromQLEditorProps & DataProviderParams) {
89
90
  const id = uuidv4();
90
91
  const {
92
+ className = '',
91
93
  size = 'middle',
92
94
  theme = 'light',
93
95
  value,
@@ -344,8 +346,12 @@ export default function PromQLEditor(props: PromQLEditorProps & DataProviderPara
344
346
  'ant-input' +
345
347
  (size ? ` ${SIZE_MAP[size].className}` : '') +
346
348
  (disabled ? ` ant-input-disabled ${containerDisabledClassName}` : '') +
347
- (readOnly ? ` ${containerReadOnlyClassName}` : '')
349
+ (readOnly ? ` ${containerReadOnlyClassName}` : '') +
350
+ ` ${className}`
348
351
  }
352
+ style={{
353
+ display: 'block',
354
+ }}
349
355
  >
350
356
  <div ref={containerRef}>
351
357
  <MonacoEditor
package/src/sql/index.tsx CHANGED
@@ -258,6 +258,7 @@ export default function SqlEditor(props: SqlEditorProps) {
258
258
  scrollBeyondLastLine: false,
259
259
  smoothScrolling: true,
260
260
  fontSize,
261
+ lineHeight: 24,
261
262
  tabSize: 2,
262
263
  wordWrap: 'on',
263
264
  automaticLayout: true,