Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dump247/storybook-state

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dump247/storybook-state - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

5

.storybook/config.js

@@ -12,3 +12,6 @@ import React from 'react';

<input {...store.state} type="text" onChange={({ target: { value } }) => store.set({ value })}/>
)));
)))
.add('no state', () => (
<div>No stuff</div>
));
}, module);

@@ -111,3 +111,3 @@ 'use strict';

_this.setState({ storyState: storyState });
channel.emit('dump247/state/change', storyState);
channel.emit('dump247/state/change', { state: storyState });
}, _temp), _possibleConstructorReturn(_this, _ret);

@@ -126,3 +126,3 @@ }

channel.on('dump247/state/reset', this.handleResetEvent);
channel.emit('dump247/state/change', store.state);
channel.emit('dump247/state/change', { state: store.state });
}

@@ -139,2 +139,3 @@ }, {

channel.removeListener('dump247/state/reset', this.handleResetEvent);
channel.emit('dump247/state/change', { state: null });
}

@@ -141,0 +142,0 @@ }, {

@@ -73,4 +73,6 @@ 'use strict';

return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = StatePanel.__proto__ || Object.getPrototypeOf(StatePanel)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
storyState: {}
}, _this.handleChangeEvent = function (storyState) {
storyState: null
}, _this.handleChangeEvent = function (_ref2) {
var storyState = _ref2.state;
_this.setState({ storyState: storyState });

@@ -107,2 +109,6 @@ }, _this.handleResetClick = function () {

if (storyState === null) {
return null;
}
return _react2.default.createElement(

@@ -109,0 +115,0 @@ 'div',

4

package.json
{
"name": "@dump247/storybook-state",
"version": "1.1.0",
"version": "1.1.1",
"description": "Manage component state in storybook stories.",

@@ -10,3 +10,3 @@ "main": "dist/index.js",

"test": "jest",
"storybook": "start-storybook -p 9001 -c .storybook"
"storybook": "npm run build && start-storybook -p 9001 -c .storybook"
},

@@ -13,0 +13,0 @@ "repository": {

@@ -60,3 +60,3 @@ import React from 'react';

channel.on('dump247/state/reset', this.handleResetEvent);
channel.emit('dump247/state/change', store.state);
channel.emit('dump247/state/change', { state: store.state });
}

@@ -69,2 +69,3 @@

channel.removeListener('dump247/state/reset', this.handleResetEvent);
channel.emit('dump247/state/change', { state: null });
}

@@ -82,3 +83,3 @@

this.setState({ storyState });
channel.emit('dump247/state/change', storyState);
channel.emit('dump247/state/change', { state: storyState });
};

@@ -85,0 +86,0 @@

@@ -39,3 +39,3 @@ import React from 'react';

state = {
storyState: {},
storyState: null,
};

@@ -55,3 +55,3 @@

handleChangeEvent = (storyState) => {
handleChangeEvent = ({ state: storyState }) => {
this.setState({ storyState });

@@ -69,2 +69,6 @@ };

if (storyState === null) {
return null;
}
return (

@@ -71,0 +75,0 @@ <div style={styles.panel}>

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