A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix: make properties toggles functional
thecodrrefc6590c624a
diff --git a/apps/web/src/components/properties/index.js b/apps/web/src/components/properties/index.jsindex 7e7b67e35..0ec5062cf 100644--- a/apps/web/src/components/properties/index.js+++ b/apps/web/src/components/properties/index.js@@ -80,7 +80,6 @@ function Properties({ noteId }) {<Animated.Flexanimate={{x: arePropertiesVisible ? 0 : 800,- display: arePropertiesVisible ? "flex" : "none",}}transition={{duration: 0.3,@@ -90,6 +89,7 @@ function Properties({ noteId }) {}}initial={false}sx={{+ display: "flex",position: "absolute",right: 0,zIndex: 3,@@ -104,7 +104,17 @@ function Properties({ noteId }) {bg="background"// px={2}>- <Card title="Properties">+ <Card+ title="Properties"+ button={+ <Icon.ArrowLeft+ data-test-id="properties-close"+ onClick={() => toggleProperties(false)}+ size={18}+ sx={{ mr: 1 }}+ />+ }+ >{tools.map((tool, _) => (<Toggle{...tool}@@ -321,26 +331,20 @@ function Properties({ noteId }) {}export default React.memo(Properties);-function Card({ title, children }) {+function Card({ title, button, children }) {return (<FlexflexDirection="column"- //mx={1}- //mt={2}sx={{- //border: "1px solid var(--border)",borderRadius: "default",}}>- <Text- variant="subtitle"- fontSize="subtitle"- mx={2}- my={2}- color="fontTertiary"- >- {title}- </Text>+ <Flex mx={2} my={2} alignItems="center">+ {button}+ <Text variant="subtitle" fontSize="subtitle" color="fontTertiary">+ {title}+ </Text>+ </Flex>{children}</Flex>);diff --git a/apps/web/src/components/properties/toggle.css b/apps/web/src/components/properties/toggle.cssindex 2b151f0f6..600a4d3a0 100644--- a/apps/web/src/components/properties/toggle.css+++ b/apps/web/src/components/properties/toggle.css@@ -21,7 +21,7 @@}.react-toggle--checked .react-toggle-thumb {- left: 18px;+ left: 15px;border-color: var(--primary);}diff --git a/apps/web/src/components/properties/toggle.js b/apps/web/src/components/properties/toggle.jsindex e952fccc8..68eba24a1 100644--- a/apps/web/src/components/properties/toggle.js+++ b/apps/web/src/components/properties/toggle.js@@ -20,16 +20,11 @@ function Toggle(props) {onClick={() => onToggle(!isOn)}data-test-id={props.testId}>- <Text- display="flex"- alignItems="center"- variant="body"- color={isOn ? "primary" : "text"}- >+ <Text display="flex" alignItems="center" variant="body" color="text"><ToggleIcon size={13} sx={{ flexShrink: 0, mr: 1 }} />{label}</Text>- <ReactToggle size={20} defaultChecked={isOn} icons={false} />+ <ReactToggle size={20} checked={isOn} icons={false} /></Flex>);}