Skip to content

Commit 5280d69

Browse files
committed
chore(editor): change renderLineHighlight type definition
1 parent 76ba7c8 commit 5280d69

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/lib/editor/CodeEditor.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
22

3-
import React from "react";
3+
import type React from "react";
44
import { Editor } from "@monaco-editor/react";
55
import { useTheme } from "@/lib/theme/ThemeProvider";
66
import {
@@ -14,9 +14,9 @@ import {
1414
useMountedState,
1515
} from "./hooks";
1616
import {
17-
CodeEditorProps,
17+
type CodeEditorProps,
1818
DEFAULT_EDITOR_OPTIONS,
19-
SupportedNetwork,
19+
type SupportedNetwork,
2020
} from "./types";
2121

2222
const CodeEditor: React.FC<CodeEditorProps> = ({

src/lib/editor/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export interface EditorOptions {
4747
cursorBlinking?: string;
4848
automaticLayout?: boolean;
4949
lineNumbers?: "on" | "off";
50-
renderLineHighlight?: string;
50+
renderLineHighlight?: "none" | "line" | "gutter" | "all";
5151
folding?: boolean;
5252
contextmenu?: boolean;
5353
formatOnPaste?: boolean;
@@ -83,7 +83,7 @@ export const DEFAULT_EDITOR_OPTIONS: EditorOptions = {
8383
cursorBlinking: "smooth",
8484
automaticLayout: true,
8585
lineNumbers: "on",
86-
renderLineHighlight: "all",
86+
renderLineHighlight: "all" as const,
8787
folding: true,
8888
contextmenu: true,
8989
formatOnPaste: true,

0 commit comments

Comments
 (0)