pcm-shared-components 0.0.52 → 0.0.55

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 {
5
+ theme,
6
+ children = React.ReactNode
7
+ } = props;
8
+ const currentTheme = createTheme(theme ? theme : useTheme());
9
+ console.log('debug currentTheme', currentTheme);
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 './components/PcSharedComponentThemeInheritor.js';
6
+ import PcSharedComponentThemeInheritor from './components/PcSharedComponentThemeInheritor';
7
7
  export { TestButton, CodeHighlight, CustomFab, HelpButton, PcSharedComponentThemeInheritor };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pcm-shared-components",
3
- "version": "0.0.52",
3
+ "version": "0.0.55",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "babel": {
@@ -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;