pcm-shared-components 0.0.51 → 0.0.54
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.
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createTheme, useTheme, ThemeProvider } from "@mui/material/styles";
|
|
3
|
+
export const PcSharedComponentThemeInheritor = props => {
|
|
4
|
+
const currentTheme = createTheme(theme ? theme : useTheme());
|
|
5
|
+
console.log('debug currentTheme', currentTheme);
|
|
6
|
+
const {
|
|
7
|
+
theme = currentTheme,
|
|
8
|
+
children = React.ReactNode
|
|
9
|
+
} = props;
|
|
10
|
+
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
11
|
+
theme: theme
|
|
12
|
+
}, children);
|
|
13
|
+
};
|
|
14
|
+
export default PcSharedComponentThemeInheritor;
|
package/dist/index.js
CHANGED
|
@@ -3,5 +3,5 @@ import TestButton from './components/Buttons/TestButton';
|
|
|
3
3
|
import CodeHighlight from './components/Tools/CodeHighlight/CodeHighlight';
|
|
4
4
|
import CustomFab from './components/Buttons/CustomFab';
|
|
5
5
|
import HelpButton from './components/Buttons/HelpButton';
|
|
6
|
-
import PcSharedComponentThemeInheritor from './PcSharedComponentThemeInheritor';
|
|
6
|
+
import PcSharedComponentThemeInheritor from './components/PcSharedComponentThemeInheritor';
|
|
7
7
|
export { TestButton, CodeHighlight, CustomFab, HelpButton, PcSharedComponentThemeInheritor };
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Theme, ThemeProvider } from "@mui/material/styles";
|
|
3
|
-
export const PcSharedComponentThemeInheritor = props => {
|
|
4
|
-
const {
|
|
5
|
-
theme = Theme,
|
|
6
|
-
children = React.ReactNode
|
|
7
|
-
} = props;
|
|
8
|
-
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
9
|
-
theme: theme
|
|
10
|
-
}, children);
|
|
11
|
-
};
|
|
12
|
-
export default PcSharedComponentThemeInheritor;
|