Socket
Socket
Sign inDemoInstall

@chakra-ui/color-mode

Package Overview
Dependencies
Maintainers
4
Versions
363
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/color-mode - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

15

CHANGELOG.md
# Change Log
## 1.1.2
### Patch Changes
- [`d70515fc2`](https://github.com/chakra-ui/chakra-ui/commit/d70515fc20279b5b2acf9a2db2bda0289b8c5408)
Thanks [@segunadebayo](https://github.com/segunadebayo)! - Fix: memoize the
context value for `ColorModeProvider`
- Updated dependencies
[[`e748219f3`](https://github.com/chakra-ui/chakra-ui/commit/e748219f300f0c51b0eb304fce38b014d7bcbc86),
[`9c143bfe5`](https://github.com/chakra-ui/chakra-ui/commit/9c143bfe5bbf180929fabb0a1b4c18d40f7fd3fc),
[`91ef14839`](https://github.com/chakra-ui/chakra-ui/commit/91ef148397187010804eb8f30307d2ec94c32c5b)]:
- @chakra-ui/hooks@1.2.0
- @chakra-ui/utils@1.4.0
## 1.1.1

@@ -4,0 +19,0 @@

12

dist/cjs/color-mode-provider.js

@@ -114,7 +114,9 @@ "use strict";

var context = {
colorMode: value != null ? value : colorMode,
toggleColorMode: value ? _utils.noop : toggleColorMode,
setColorMode: value ? _utils.noop : setColorMode
};
var context = React.useMemo(function () {
return {
colorMode: value != null ? value : colorMode,
toggleColorMode: value ? _utils.noop : toggleColorMode,
setColorMode: value ? _utils.noop : setColorMode
};
}, [colorMode, setColorMode, toggleColorMode, value]);
return /*#__PURE__*/React.createElement(ColorModeContext.Provider, {

@@ -121,0 +123,0 @@ value: context

@@ -94,7 +94,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

var context = {
var context = React.useMemo(() => ({
colorMode: value != null ? value : colorMode,
toggleColorMode: value ? noop : toggleColorMode,
setColorMode: value ? noop : setColorMode
};
}), [colorMode, setColorMode, toggleColorMode, value]);
return /*#__PURE__*/React.createElement(ColorModeContext.Provider, {

@@ -101,0 +101,0 @@ value: context

{
"name": "@chakra-ui/color-mode",
"version": "1.1.1",
"version": "1.1.2",
"description": "React component and hooks for handling light and dark mode.",

@@ -60,4 +60,4 @@ "keywords": [

"dependencies": {
"@chakra-ui/hooks": "1.1.5",
"@chakra-ui/utils": "1.3.0"
"@chakra-ui/hooks": "1.2.0",
"@chakra-ui/utils": "1.4.0"
},

@@ -64,0 +64,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc