summaryrefslogtreecommitdiffstats
path: root/web/react/utils/utils.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/utils/utils.jsx')
-rw-r--r--web/react/utils/utils.jsx11
1 files changed, 11 insertions, 0 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index 9b2f7e057..b3d1350b6 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -694,6 +694,17 @@ export function applyTheme(theme) {
}
updateCodeTheme(theme.codeTheme);
}
+
+export function applyFont(fontName) {
+ const body = document.querySelector('body');
+ body.classList.forEach((className) => {
+ if (className.lastIndexOf('font') === 0) {
+ body.classList.remove(className);
+ }
+ });
+ body.classList.add(Constants.FONTS[fontName]);
+}
+
export function changeCss(className, classValue, classRepeat) {
// we need invisible container to store additional css definitions
var cssMainContainer = $('#css-modifier-container');