Skip to content

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

refactor: remove checkbox

thecodrr37cd0ce2fafb
diff --git a/apps/web/src/components/checkbox/index.js b/apps/web/src/components/checkbox/index.js
deleted file mode 100644
index 67b8ef39f..000000000
--- a/apps/web/src/components/checkbox/index.js
+++ /dev/null
@@ -1,35 +0,0 @@
-import React, { useState, useEffect } from "react";
-import { Flex, Text } from "rebass";
-import { Switch } from "@rebass/forms";
-
-function CheckBox(props) {
- const [checked, setChecked] = useState(props.checked || false);
- useEffect(() => {
- setChecked(props.checked);
- }, [props.checked]);
- return (
- <Flex
- onClick={() => {
- if (props.onChecked) {
- props.onChecked(!checked);
- setChecked(!checked);
- }
- if (props.onClick) {
- props.onClick();
- }
- }}
- width="full"
- alignItems="center"
- justifyContent="space-between"
- sx={{ cursor: "pointer", marginBottom: 2 }}
- >
- <Flex fontSize="body" sx={{ cursor: "pointer" }} alignItems="center">
- <props.icon size={18} />
- <Text sx={{ marginLeft: 1 }}>{props.label}</Text>
- </Flex>
-
- <Switch checked={checked} />
- </Flex>
- );
-}
-export default CheckBox;