@pedidopago/ui 1.0.9 → 1.1.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../../../src/shared/theme/contexts/ThemeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAuB,MAAM,OAAO,CAAC;AAQtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,aAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,gBAAgB,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,aAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACpC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,YAAY,4CAAyC,CAAC;AAEnE,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../../../src/shared/theme/contexts/ThemeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAuB,MAAM,OAAO,CAAC;AAQtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,aAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,gBAAgB,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,aAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACpC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,YAAY,4CAAyC,CAAC;AAEnE,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eA8B1F"}
|
|
@@ -57,29 +57,6 @@ function PPUIThemeProvider(_ref) {
|
|
|
57
57
|
}
|
|
58
58
|
}, [setColorMode]);
|
|
59
59
|
|
|
60
|
-
if (process.env.DEV_MODE) {
|
|
61
|
-
var module = require('@storybook/addons');
|
|
62
|
-
|
|
63
|
-
var addons = module.addons; // only for storybook
|
|
64
|
-
|
|
65
|
-
var channel;
|
|
66
|
-
|
|
67
|
-
if (addons.hasChannel()) {
|
|
68
|
-
channel = addons.getChannel();
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (channel) {
|
|
72
|
-
(0, _react.useEffect)(function () {
|
|
73
|
-
if (!channel) return;
|
|
74
|
-
channel.on('DARK_MODE', setColorMode);
|
|
75
|
-
return function () {
|
|
76
|
-
if (!channel) return;
|
|
77
|
-
channel.off('DARK_MODE', setColorMode);
|
|
78
|
-
};
|
|
79
|
-
}, [channel, setColorMode]);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
60
|
function switchColorMode() {
|
|
84
61
|
var newColorMode = !colorMode;
|
|
85
62
|
|