@storybook/addon-viewport
Advanced tools
Comparing version 4.0.0-alpha.1 to 4.0.0-alpha.2
@@ -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 @@ |
@@ -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); |
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
263690
1762
+ Added@storybook/addons@4.0.0-alpha.2(transitive)
+ Added@storybook/channels@4.0.0-alpha.2(transitive)
+ Added@storybook/components@4.0.0-alpha.2(transitive)
- Removed@storybook/addons@3.4.12(transitive)
- Removed@storybook/components@4.0.0-alpha.1(transitive)