@pikas-ui/styles
Advanced tools
Comparing version 2.1.4 to 2.1.5
@@ -18,3 +18,3 @@ import react__default from 'react'; | ||
} | ||
declare type PikasUIContextType = typeof theme | null; | ||
declare type PikasUIContextType = typeof theme | undefined; | ||
declare const PikasUIContext: react__default.Context<PikasUIContextType>; | ||
@@ -21,0 +21,0 @@ declare const PikasUIProvider: react__default.FC<PikasUIProviderProps>; |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"use strict";var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _cssjs = require('../css.js');var _lodashmerge = require('lodash.merge'); var _lodashmerge2 = _interopRequireDefault(_lodashmerge);var _lodashclonedeep = require('lodash.clonedeep'); var _lodashclonedeep2 = _interopRequireDefault(_lodashclonedeep);var _usehooksts = require('usehooks-ts');const p=_react.createContext.call(void 0, null),v= exports.PikasUIProvider =({lightTheme:e,darkTheme:t,children:c})=>{const{isDarkMode:d}=_usehooksts.useTernaryDarkMode.call(void 0, ),[m]=_react.useState.call(void 0, _lodashmerge2.default.call(void 0, _lodashclonedeep2.default.call(void 0, _cssjs.theme),e)),[h]=_react.useState.call(void 0, _lodashmerge2.default.call(void 0, _lodashclonedeep2.default.call(void 0, _cssjs.theme),t));return _react2.default.createElement(p.Provider,{value:d?h:m},_react2.default.createElement(u,null,c))},f=_cssjs.styled.call(void 0, "div",{width:"100%",height:"100%"}),u=({children:e})=>{const t=_react.useContext.call(void 0, p);return _react2.default.createElement(f,{className:t||void 0},e)};exports.PikasUIContext = p; exports.PikasUIProvider = v; exports.useTernaryDarkMode = _usehooksts.useTernaryDarkMode; | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"use strict";var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _cssjs = require('../css.js');var _lodashmerge = require('lodash.merge'); var _lodashmerge2 = _interopRequireDefault(_lodashmerge);var _lodashclonedeep = require('lodash.clonedeep'); var _lodashclonedeep2 = _interopRequireDefault(_lodashclonedeep);var _usehooksts = require('usehooks-ts');const p=_react.createContext.call(void 0, void 0),g= exports.PikasUIProvider =({lightTheme:e,darkTheme:t,children:r})=>{const{isDarkMode:c}=_usehooksts.useTernaryDarkMode.call(void 0, ),[m]=_react.useState.call(void 0, _lodashmerge2.default.call(void 0, _lodashclonedeep2.default.call(void 0, _cssjs.theme),e)),[h]=_react.useState.call(void 0, _lodashmerge2.default.call(void 0, _lodashclonedeep2.default.call(void 0, _cssjs.theme),t));return _react2.default.createElement(p.Provider,{value:c?h:m},_react2.default.createElement(l,null,r))},k=_cssjs.styled.call(void 0, "div",{width:"100%",height:"100%"}),l=({children:e})=>{const t=_react.useContext.call(void 0, p),{isBrowser:r}=_usehooksts.useSsr.call(void 0, );return _react2.default.createElement(k,{className:r?t:void 0},e)};exports.PikasUIContext = p; exports.PikasUIProvider = g; exports.useTernaryDarkMode = _usehooksts.useTernaryDarkMode; | ||
//# sourceMappingURL=PikasUIProvider.js.map |
{ | ||
"name": "@pikas-ui/styles", | ||
"version": "2.1.4", | ||
"version": "2.1.5", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
206444