Skip to content

Commit 0b1542c

Browse files
committed
use dynamic colours
1 parent a1928ed commit 0b1542c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

demo/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { basicSetup, EditorView } from "codemirror";
66
import {
77
cteCompletionSource,
88
DefaultSqlTooltipRenders,
9+
defaultSqlHoverTheme,
910
NodeSqlParser,
1011
sqlExtension,
1112
} from "../src/index.js";
@@ -231,6 +232,7 @@ function initializeEditor() {
231232
// Custom renderer for tables
232233
table: tableTooltipRenderer,
233234
},
235+
theme: defaultSqlHoverTheme("light"),
234236
},
235237
}),
236238
dialect.language.data.of({

src/sql/hover.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,8 @@ export const defaultSqlHoverTheme = (theme: "light" | "dark" = "light"): Extensi
553553
return EditorView.theme({
554554
".cm-sql-hover-tooltip": {
555555
padding: "8px 12px",
556-
backgroundColor: "#ffffff",
557-
border: "1px solid #e5e7eb",
556+
backgroundColor: colors.tooltipBg,
557+
border: `1px solid ${colors.tooltipBorder}`,
558558
borderRadius: "6px",
559559
boxShadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
560560
fontSize: "13px",

0 commit comments

Comments
 (0)