From c0dd870c6edde77a7154c367f2f94c09f2f1440f Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Thu, 13 Aug 2020 04:35:31 -0700 Subject: [PATCH] Dark mode (#2006) Co-authored-by: dwelle --- src/actions/actionGroup.tsx | 6 +- src/actions/actionZindex.tsx | 24 +- src/appState.ts | 2 + src/components/App.tsx | 5 + .../BackgroundPickerAndDarkModeToggle.tsx | 26 ++ src/components/ColorPicker.scss | 45 +- src/components/ColorPicker.tsx | 5 +- src/components/ContextMenu.scss | 12 +- src/components/DarkModeToggle.tsx | 52 +++ src/components/Dialog.scss | 5 +- src/components/ExportDialog.scss | 8 + src/components/GitHubCorner.tsx | 61 +-- src/components/HintViewer.scss | 2 +- src/components/LayerUI.scss | 1 + src/components/LayerUI.tsx | 9 +- src/components/LibraryUnit.scss | 4 +- src/components/LibraryUnit.tsx | 5 +- src/components/MobileMenu.tsx | 7 +- src/components/Modal.scss | 2 +- src/components/RoomDialog.scss | 18 +- src/components/ShortcutsDialog.scss | 40 ++ src/components/ShortcutsDialog.tsx | 62 +-- src/components/TextInput.scss | 9 +- src/components/ToolIcon.scss | 19 +- src/components/icons.tsx | 399 ++++++++++-------- src/css/styles.scss | 51 ++- src/css/theme.scss | 66 ++- src/data/blob.ts | 1 + src/element/textWysiwyg.tsx | 1 + src/locales/en.json | 1 + src/shapes.tsx | 3 +- .../regressionTests.test.tsx.snap | 66 +++ src/types.ts | 1 + 33 files changed, 660 insertions(+), 358 deletions(-) create mode 100644 src/components/BackgroundPickerAndDarkModeToggle.tsx create mode 100644 src/components/DarkModeToggle.tsx create mode 100644 src/components/ShortcutsDialog.scss diff --git a/src/actions/actionGroup.tsx b/src/actions/actionGroup.tsx index 4d606ad4..73692c71 100644 --- a/src/actions/actionGroup.tsx +++ b/src/actions/actionGroup.tsx @@ -3,7 +3,7 @@ import { KEYS } from "../keys"; import { t } from "../i18n"; import { getShortcutKey } from "../utils"; import { register } from "./register"; -import { group, ungroup } from "../components/icons"; +import { UngroupIcon, GroupIcon } from "../components/icons"; import { newElementWith } from "../element/mutateElement"; import { getSelectedElements, isSomeElementSelected } from "../scene"; import { @@ -140,7 +140,7 @@ export const actionGroup = register({