Socket
Socket
Sign inDemoInstall

@storybook/addon-viewport

Package Overview
Dependencies
Maintainers
12
Versions
1872
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/addon-viewport - npm Package Compare versions

Comparing version 4.0.0-alpha.1 to 4.0.0-alpha.2

5

dist/manager/components/Panel.js

@@ -183,2 +183,7 @@ 'use strict';

}
// Always make parent's height equals iframe
if (_this.iframe.parentElement) {
_this.iframe.parentElement.style.height = _this.iframe.style.height;
}
};

@@ -185,0 +190,0 @@

4

dist/preview/components/Viewport.js

@@ -64,4 +64,4 @@ 'use strict';

(0, _createClass3.default)(Viewport, [{
key: 'componentWillMount',
value: function componentWillMount() {
key: 'componentDidMount',
value: function componentDidMount() {
if (this.onViewportChange) {

@@ -68,0 +68,0 @@ this.channel.on(_shared.VIEWPORT_CHANGED_EVENT_ID, this.onViewportChange);

{
"name": "@storybook/addon-viewport",
"version": "4.0.0-alpha.1",
"version": "4.0.0-alpha.2",
"description": "Storybook addon to change the viewport size to mobile",

@@ -14,3 +14,4 @@ "keywords": [

"dependencies": {
"@storybook/components": "4.0.0-alpha.1",
"@storybook/addons": "4.0.0-alpha.2",
"@storybook/components": "4.0.0-alpha.2",
"babel-runtime": "^6.26.0",

@@ -22,5 +23,4 @@ "global": "^4.3.2",

"peerDependencies": {
"@storybook/addons": "^3.3.0",
"react": "*"
}
}

@@ -173,2 +173,7 @@ import React, { Component } from 'react';

}
// Always make parent's height equals iframe
if (this.iframe.parentElement) {
this.iframe.parentElement.style.height = this.iframe.style.height;
}
};

@@ -175,0 +180,0 @@

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

describe('componentWillMount', () => {
describe('componentDidMount', () => {
it('publishes `set` event with `iphone6`', () => {

@@ -41,0 +41,0 @@ expect(channel.emit).toHaveBeenCalledTimes(1);

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

componentWillMount() {
componentDidMount() {
if (this.onViewportChange) {

@@ -38,0 +38,0 @@ this.channel.on(VIEWPORT_CHANGED_EVENT_ID, this.onViewportChange);

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