@pikas-ui/styles
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -10,2 +10,3 @@ export { CSS, config, createTheme, css, getCssText, globalCss, keyframes, prefix, reset, stitchesConfig, styled, theme } from './css.js'; | ||
export { PikasUIContext, PikasUIContextType, PikasUIProvider, PikasUIProviderProps } from './PikasUIProvider/PikasUIProvider.js'; | ||
export { useDarkMode } from 'usehooks-ts'; | ||
import '@stitches/react/types/theme.js'; | ||
@@ -12,0 +13,0 @@ import '@stitches/react/types/css.js'; |
export { PikasUIContext, PikasUIContextType, PikasUIProvider, PikasUIProviderProps } from './PikasUIProvider.js'; | ||
export { useDarkMode } from 'usehooks-ts'; | ||
import 'react'; | ||
@@ -3,0 +4,0 @@ import '../css.js'; |
import react__default from 'react'; | ||
import { createTheme, theme } from '../css.js'; | ||
export { useDarkMode } from 'usehooks-ts'; | ||
import '@stitches/react/types/theme.js'; | ||
@@ -14,3 +15,4 @@ import '@stitches/react/types/css.js'; | ||
children?: react__default.ReactNode; | ||
theme?: ReturnType<typeof createTheme>; | ||
lightTheme?: ReturnType<typeof createTheme>; | ||
darkTheme?: ReturnType<typeof createTheme>; | ||
} | ||
@@ -17,0 +19,0 @@ declare type PikasUIContextType = typeof theme | null; |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _cssjs = require('../css.js');var _lodashmerge = require('lodash.merge'); var _lodashmerge2 = _interopRequireDefault(_lodashmerge);const p=_cssjs.styled.call(void 0, "div",{width:"100%",height:"100%"}),P= exports.PikasUIContext =_react.createContext.call(void 0, null),x= exports.PikasUIProvider =({theme:r,children:o})=>{const[e]=_react.useState.call(void 0, _lodashmerge2.default.call(void 0, _cssjs.theme,r));return _react2.default.createElement(P.Provider,{value:e},_react2.default.createElement(p,{className:e},o))};exports.PikasUIContext = P; exports.PikasUIProvider = x; | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _cssjs = require('../css.js');var _lodashmerge = require('lodash.merge'); var _lodashmerge2 = _interopRequireDefault(_lodashmerge);var _usehooksts = require('usehooks-ts');const P=_cssjs.styled.call(void 0, "div",{width:"100%",height:"100%"}),l= exports.PikasUIContext =_react.createContext.call(void 0, null),y= exports.PikasUIProvider =({lightTheme:m,darkTheme:p,children:d})=>{const{isDarkMode:e}=_usehooksts.useDarkMode.call(void 0, ),[t]=_react.useState.call(void 0, _lodashmerge2.default.call(void 0, _cssjs.theme,m)),[r]=_react.useState.call(void 0, _lodashmerge2.default.call(void 0, _cssjs.theme,p));return _react2.default.createElement(l.Provider,{value:e?r:t},_react2.default.createElement(P,{className:e?r:t},d))};exports.PikasUIContext = l; exports.PikasUIProvider = y; exports.useDarkMode = _usehooksts.useDarkMode; | ||
//# sourceMappingURL=PikasUIProvider.js.map |
{ | ||
"name": "@pikas-ui/styles", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"private": false, | ||
@@ -34,3 +34,4 @@ "description": "", | ||
"@stitches/react": "^1.2.8", | ||
"lodash.merge": "^4.6.2" | ||
"lodash.merge": "^4.6.2", | ||
"usehooks-ts": "^2.5.4" | ||
}, | ||
@@ -37,0 +38,0 @@ "devDependencies": { |
@@ -36,3 +36,3 @@ # @pikas-ui/styles | ||
```tsx | ||
import { globalCss } from '@pikas-ui/styles'; | ||
import { globalCss, createTheme, customGlobalCss } from '@pikas-ui/styles'; | ||
@@ -86,2 +86,4 @@ const globalCssCustom = globalCss({ | ||
const App: React.FC = () => { | ||
customGlobalCss() | ||
return ( | ||
@@ -88,0 +90,0 @@ <PikasUIProvider theme={myTheme}> |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
204128
2886
368
3
+ Addedusehooks-ts@^2.5.4
+ Addedlodash.debounce@4.0.8(transitive)
+ Addedusehooks-ts@2.16.0(transitive)