mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
add selector for code editor (#33554)
This commit is contained in:
parent
759a0cd71b
commit
cedac5f4d4
@ -192,4 +192,7 @@ export const Components = {
|
|||||||
DataLinksContextMenu: {
|
DataLinksContextMenu: {
|
||||||
singleLink: 'Data link',
|
singleLink: 'Data link',
|
||||||
},
|
},
|
||||||
|
CodeEditor: {
|
||||||
|
container: 'Code editor container',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
import { selectors } from '@grafana/e2e-selectors';
|
||||||
import { withTheme } from '../../themes';
|
import { withTheme } from '../../themes';
|
||||||
import { Themeable } from '../../types';
|
import { Themeable } from '../../types';
|
||||||
import { Monaco, MonacoEditor as MonacoEditorType, CodeEditorProps, MonacoOptions } from './types';
|
import { Monaco, MonacoEditor as MonacoEditorType, CodeEditorProps, MonacoOptions } from './types';
|
||||||
@ -124,7 +126,7 @@ class UnthemedCodeEditor extends React.PureComponent<Props> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div onBlur={this.onBlur}>
|
<div onBlur={this.onBlur} aria-label={selectors.components.CodeEditor.container}>
|
||||||
<MonacoEditor
|
<MonacoEditor
|
||||||
width={width}
|
width={width}
|
||||||
height={height}
|
height={height}
|
||||||
|
Loading…
Reference in New Issue
Block a user