mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
21 lines
467 B
TypeScript
21 lines
467 B
TypeScript
|
import CodeMirror, { EditorView } from "@uiw/react-codemirror";
|
||
|
import { PromQLExtension } from "@prometheus-io/codemirror-promql";
|
||
|
|
||
|
const promqlExtension = new PromQLExtension();
|
||
|
function App() {
|
||
|
|
||
|
return (
|
||
|
<CodeMirror
|
||
|
basicSetup={false}
|
||
|
value="rate(foo)"
|
||
|
editable={false}
|
||
|
extensions={[
|
||
|
promqlExtension.asExtension(),
|
||
|
EditorView.lineWrapping,
|
||
|
]}
|
||
|
/>
|
||
|
)
|
||
|
}
|
||
|
|
||
|
export default App
|