Remove duplicative Toggle component (#3028)

fix: Tidy some styling and spacing issues in settings
This commit is contained in:
Tom Moor
2022-01-28 20:23:02 -08:00
committed by GitHub
parent 1cd770e38d
commit 76d83b5e82
19 changed files with 112 additions and 197 deletions

View File

@@ -38,7 +38,7 @@ import Separator from "~/components/ContextMenu/Separator";
import Template from "~/components/ContextMenu/Template";
import Flex from "~/components/Flex";
import Modal from "~/components/Modal";
import Toggle from "~/components/Toggle";
import Switch from "~/components/Switch";
import { actionToMenuItem } from "~/actions";
import {
pinDocument,
@@ -453,10 +453,12 @@ function DocumentMenu({
<Separator />
<Style>
<ToggleMenuItem
width={26}
height={14}
label={t("Full width")}
checked={document.fullWidth}
onChange={(ev) => {
document.fullWidth = ev.target.checked;
document.fullWidth = ev.currentTarget.checked;
document.save();
}}
/>
@@ -526,8 +528,8 @@ function DocumentMenu({
);
}
const ToggleMenuItem = styled(Toggle)`
span {
const ToggleMenuItem = styled(Switch)`
* {
font-weight: normal;
color: ${(props) => props.theme.textSecondary};
}