Add theming support

This commit is contained in:
Robert Long
2021-11-17 17:52:31 -08:00
parent 3df1f89f06
commit 10a8433ccf
8 changed files with 34 additions and 17 deletions

View File

@@ -22,6 +22,16 @@ import App from "./App";
import * as Sentry from "@sentry/react";
import { Integrations } from "@sentry/tracing";
if (import.meta.env.VITE_CUSTOM_THEME) {
const style = document.documentElement.style;
style.setProperty("--primaryColor", import.meta.env.VITE_PRIMARY_COLOR);
style.setProperty("--bgColor1", import.meta.env.VITE_BG_COLOR_1);
style.setProperty("--bgColor2", import.meta.env.VITE_BG_COLOR_2);
style.setProperty("--bgColor3", import.meta.env.VITE_BG_COLOR_3);
style.setProperty("--bgColor4", import.meta.env.VITE_BG_COLOR_4);
style.setProperty("--textColor1", import.meta.env.VITE_TEXT_COLOR_1);
}
const history = createBrowserHistory();
Sentry.init({