1 | 'use client';
|
2 |
|
3 | import * as React from 'react';
|
4 | import ThemeProviderNoVars from "./ThemeProviderNoVars.js";
|
5 | import { CssVarsProvider } from "./ThemeProviderWithVars.js";
|
6 | import THEME_ID from "./identifier.js";
|
7 | import { jsx as _jsx } from "react/jsx-runtime";
|
8 | export default function ThemeProvider({
|
9 | theme,
|
10 | ...props
|
11 | }) {
|
12 | if (typeof theme === 'function') {
|
13 | return _jsx(ThemeProviderNoVars, {
|
14 | theme: theme,
|
15 | ...props
|
16 | });
|
17 | }
|
18 | const muiTheme = THEME_ID in theme ? theme[THEME_ID] : theme;
|
19 | if (!('colorSchemes' in muiTheme)) {
|
20 | return _jsx(ThemeProviderNoVars, {
|
21 | theme: theme,
|
22 | ...props
|
23 | });
|
24 | }
|
25 | return _jsx(CssVarsProvider, {
|
26 | theme: theme,
|
27 | ...props
|
28 | });
|
29 | } |
\ | No newline at end of file |