Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

make navigation view resizeable

thecodrr8421f1024d74
diff --git a/apps/web/src/app.js b/apps/web/src/app.js
index 309c3d73d..c8882f4c9 100644
--- a/apps/web/src/app.js
+++ b/apps/web/src/app.js
@@ -36,7 +36,7 @@ const NavMenuItem = props => {
</Button>
);
};
-
+var startX, startWidth;
function App() {
const [selectedIndex, setSelectedIndex] = useState(1);
return (
@@ -81,6 +81,27 @@ function App() {
px={2}
py={2}
width={["100%", "40%", "15%"]}
+ //style={{ width: "362px" }}
+ />
+ <Box
+ className="resize-handle"
+ bg="border"
+ sx={{
+ width: 5,
+ opacity: 0,
+ cursor: "col-resize"
+ }}
+ draggable={true}
+ onDragStart={e => {
+ startX = e.clientX;
+ let view = document.querySelector(".navigationView");
+ console.log(view);
+ startWidth = view.clientWidth;
+ }}
+ onDrag={e => {
+ let view = document.querySelector(".navigationView");
+ view.style.width = `${startWidth + e.clientX - startX}px`;
+ }}
/>
<Editor />
<Flex