storybook-dark-mode
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -11,3 +11,3 @@ "use strict"; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _managerApi = require("@storybook/manager-api"); | ||
var _previewApi = require("@storybook/preview-api"); | ||
var _constants = require("./constants"); | ||
@@ -42,3 +42,3 @@ Object.keys(_constants).forEach(function (key) { | ||
_react["default"].useEffect(function () { | ||
var chan = _managerApi.addons.getChannel(); | ||
var chan = _previewApi.addons.getChannel(); | ||
chan.on(_constants.DARK_MODE_EVENT_NAME, setIsDark); | ||
@@ -45,0 +45,0 @@ return function () { |
@@ -8,3 +8,3 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | ||
import React from 'react'; | ||
import { addons } from '@storybook/manager-api'; | ||
import { addons } from '@storybook/preview-api'; | ||
import { DARK_MODE_EVENT_NAME } from './constants'; | ||
@@ -11,0 +11,0 @@ import { store } from './Tool'; |
{ | ||
"name": "storybook-dark-mode", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Toggle between light and dark mode in Storybook", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
@@ -321,2 +321,3 @@ # storybook-dark-mode | ||
<td align="center"><a href="https://github.com/RohanPoojary1107"><img src="https://avatars.githubusercontent.com/u/47334631?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rohan Poojary</b></sub></a><br /><a href="https://github.com/hipstersmoothie/storybook-dark-mode/commits?author=RohanPoojary1107" title="Documentation">๐</a> <a href="#infra-RohanPoojary1107" title="Infrastructure (Hosting, Build-Tools, etc)">๐</a> <a href="https://github.com/hipstersmoothie/storybook-dark-mode/commits?author=RohanPoojary1107" title="Code">๐ป</a></td> | ||
<td align="center"><a href="https://github.com/leiit"><img src="https://avatars.githubusercontent.com/u/3333374?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Lauri Luotola</b></sub></a><br /><a href="#example-leiit" title="Examples">๐ก</a> <a href="https://github.com/hipstersmoothie/storybook-dark-mode/commits?author=leiit" title="Code">๐ป</a></td> | ||
</tr> | ||
@@ -323,0 +324,0 @@ </table> |
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
75521
331