Skip to content

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

refactor: move properties to its own component

alihamuhf2444f078ef9
diff --git a/apps/web/src/app.js b/apps/web/src/app.js
index 1226f5cfd..cb404c2d2 100644
--- a/apps/web/src/app.js
+++ b/apps/web/src/app.js
@@ -8,6 +8,7 @@ import { routes, navigate } from "./navigation";
import CheckBox from "./components/checkbox";
import * as Icon from "react-feather";
import "./app.css";
+import Properties from "./views/Properties";
const NavMenuItem = props => {
useEffect(() => {
@@ -117,7 +118,8 @@ function App() {
}}
/>
<Editor />
- <Flex
+ <Properties />
+ {/* <Flex
sx={{ borderLeft: "1px solid", borderColor: "border" }}
flexDirection="column"
bg="#1790F307"
@@ -166,7 +168,7 @@ function App() {
</Box>
))}
</Flex>
- </Flex>
+ </Flex> */}
</Flex>
<Box id="dialogContainer" />
<Box id="snackbarContainer" />
diff --git a/apps/web/src/views/Properties.js b/apps/web/src/views/Properties.js
new file mode 100644
index 000000000..2ee1e652b
--- /dev/null
+++ b/apps/web/src/views/Properties.js
@@ -0,0 +1,62 @@
+import React from "react";
+import * as Icon from "react-feather";
+import { Flex, Box, Text } from "rebass";
+import { Input } from "@rebass/forms";
+import CheckBox from "../components/checkbox";
+
+function Properties() {
+ return (
+ <Flex
+ sx={{ borderLeft: "1px solid", borderColor: "border" }}
+ flexDirection="column"
+ bg="#1790F307"
+ flex="1 1 auto"
+ px={2}
+ py={2}
+ width={["0%", "0%", "10%"]}
+ >
+ <Text variant="title" color="primary" my={2}>
+ Properties
+ </Text>
+ <CheckBox icon={Icon.MapPin} label="Pin" />
+ <CheckBox icon={Icon.Star} label="Favorite" />
+ <CheckBox icon={Icon.Lock} label="Lock" />
+ <Flex
+ className="unselectable"
+ fontSize="body"
+ sx={{ marginBottom: 2 }}
+ alignItems="center"
+ >
+ <Icon.Tag size={18} />
+ <Text sx={{ marginLeft: 1 }}>Tags:</Text>
+ </Flex>
+ <Input sx={{ marginBottom: 2 }} variant="default" />
+ <Flex
+ className="unselectable"
+ fontSize="body"
+ sx={{ marginBottom: 2 }}
+ alignItems="center"
+ >
+ <Icon.Octagon size={18} />
+ <Text sx={{ marginLeft: 1 }}>Colors:</Text>
+ </Flex>
+ <Flex flexWrap="wrap" sx={{ marginBottom: 2 }}>
+ {[
+ { label: "red", code: "#ed2d37" },
+ { label: "orange", code: "#ec6e05" },
+ { label: "yellow", code: "yellow" },
+ { label: "green", code: "green" },
+ { label: "blue", code: "blue" },
+ { label: "purple", code: "purple" },
+ { label: "gray", code: "gray" }
+ ].map(color => (
+ <Box sx={{ cursor: "pointer" }}>
+ <Icon.Circle size={40} fill={color.code} strokeWidth={0} />
+ </Box>
+ ))}
+ </Flex>
+ </Flex>
+ );
+}
+
+export default Properties;