@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.
- package/dist/monaco-editor.cjs.development.js +8 -2
- package/dist/monaco-editor.cjs.development.js.map +1 -1
- package/dist/monaco-editor.cjs.production.min.js +1 -1
- package/dist/monaco-editor.cjs.production.min.js.map +1 -1
- package/dist/monaco-editor.esm.js +8 -2
- package/dist/monaco-editor.esm.js.map +1 -1
- package/dist/promql/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/promql/index.tsx +7 -1
- package/src/sql/index.tsx +1 -0
package/dist/promql/index.d.ts
CHANGED
|
@@ -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
package/src/promql/index.tsx
CHANGED
|
@@ -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
|