@sanity/ui 2.3.6-canary.1 → 2.3.6-canary.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.compiled.mjs +37 -13
- package/dist/index.compiled.mjs.map +1 -1
- package/dist/index.esm.js +1 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/core/theme/themeProvider.tsx +3 -6
package/dist/index.js
CHANGED
|
@@ -131,12 +131,7 @@ function createGlobalScopedContext(key2, defaultValue) {
|
|
|
131
131
|
const key$8 = Symbol.for("@sanity/ui/context/theme"), ThemeContext = createGlobalScopedContext(key$8, null);
|
|
132
132
|
function ThemeProvider(props) {
|
|
133
133
|
var _a;
|
|
134
|
-
const parentTheme = react.useContext(ThemeContext), {
|
|
135
|
-
children,
|
|
136
|
-
// scheme = parentTheme?.scheme || 'light',
|
|
137
|
-
theme: rootTheme = (parentTheme == null ? void 0 : parentTheme.theme) || null,
|
|
138
|
-
tone = (parentTheme == null ? void 0 : parentTheme.tone) || "default"
|
|
139
|
-
} = props, scheme = (_a = props.scheme) != null ? _a : (parentTheme == null ? void 0 : parentTheme.scheme) || "light", themeContext = react.useMemo(() => rootTheme ? {
|
|
134
|
+
const { children } = props, parentTheme = react.useContext(ThemeContext), scheme = (_a = props.scheme) != null ? _a : (parentTheme == null ? void 0 : parentTheme.scheme) || "light", rootTheme = (parentTheme == null ? void 0 : parentTheme.theme) || null, tone = (parentTheme == null ? void 0 : parentTheme.tone) || "default", themeContext = react.useMemo(() => rootTheme ? {
|
|
140
135
|
version: 0,
|
|
141
136
|
theme: rootTheme,
|
|
142
137
|
scheme,
|