@escolalms/components
Advanced tools
Comparing version 0.0.60 to 0.0.61
@@ -7,3 +7,4 @@ import React from "react"; | ||
hidden?: boolean; | ||
initialTheme?: DefaultTheme; | ||
}>; | ||
export default ThemeCustomizer; |
@@ -75,4 +75,4 @@ "use strict"; | ||
var ThemeCustomizer = function (_a) { | ||
var onUpdate = _a.onUpdate, _b = _a.hasAll, hasAll = _b === void 0 ? false : _b, _c = _a.hidden, hidden = _c === void 0 ? false : _c; | ||
var localTheme = (0, useLocalTheme_1.useLocalTheme)()[0]; | ||
var onUpdate = _a.onUpdate, _b = _a.hasAll, hasAll = _b === void 0 ? false : _b, _c = _a.hidden, hidden = _c === void 0 ? false : _c, initialTheme = _a.initialTheme; | ||
var localTheme = (0, useLocalTheme_1.useLocalTheme)(initialTheme)[0]; | ||
var initData = (0, react_1.useMemo)(function () { | ||
@@ -79,0 +79,0 @@ return filterInputData(localTheme); |
@@ -25,5 +25,5 @@ "use strict"; | ||
typeof window.localStorage.getItem("theme") === "string") { | ||
var theme_2; | ||
//let theme: Required<DefaultTheme>; | ||
try { | ||
theme_2 = __assign(__assign({ mode: "light", theme: Object.keys(theme_1.default).includes(window.location.hash.substr(1)) | ||
theme = __assign(__assign({ mode: "light", theme: Object.keys(theme_1.default).includes(window.location.hash.substr(1)) | ||
? window.location.hash.substr(1) | ||
@@ -35,3 +35,3 @@ : "all" }, orange_1.orangeTheme), JSON.parse(window.localStorage.getItem("theme") || "")); | ||
} | ||
return theme_2; | ||
return theme; | ||
} | ||
@@ -38,0 +38,0 @@ return theme; |
{ | ||
"name": "@escolalms/components", | ||
"version": "0.0.60", | ||
"version": "0.0.61", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -14,3 +14,3 @@ import { useCallback, useEffect, useState } from "react"; | ||
) { | ||
let theme: Required<DefaultTheme>; | ||
//let theme: Required<DefaultTheme>; | ||
try { | ||
@@ -17,0 +17,0 @@ theme = { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17024187
27142