Skip to content

Commit 47401a7

Browse files
committed
chore: using variable instead of hard-coded size
1 parent bb87b3c commit 47401a7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/ext/extension-page/App.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
let sidebarHidden = false;
6464
let sidebarWidth = "23svw";
6565
const sidebarMinWidth = "20rem";
66+
const editorMinWidth = "20rem";
6667
6768
function sidebarSwitch() {
6869
sidebarHidden = !sidebarHidden;
@@ -76,7 +77,7 @@
7677
} else if (event.type === "mousemove") {
7778
const vw = window.innerWidth;
7879
const sw = (event.x / vw) * 100;
79-
sidebarWidth = `max(min(${sw}svw, 100svw - 20rem), ${sidebarMinWidth})`;
80+
sidebarWidth = `max(min(${sw}svw, 100svw - ${editorMinWidth}), ${sidebarMinWidth})`;
8081
}
8182
event.preventDefault();
8283
}

0 commit comments

Comments
 (0)