@storybook/addon-viewport
Advanced tools
Comparing version 3.4.0-alpha.8 to 3.4.0-alpha.9
@@ -44,3 +44,3 @@ 'use strict'; | ||
'label', | ||
{ style: styles.label }, | ||
{ htmlFor: 'rotate', style: styles.label }, | ||
'Rotate' | ||
@@ -50,3 +50,3 @@ ), | ||
'button', | ||
(0, _extends3.default)({}, props, { style: actionStyles }), | ||
(0, _extends3.default)({ id: 'rotate' }, props, { style: actionStyles }), | ||
active ? 'Vertical' : 'Landscape' | ||
@@ -53,0 +53,0 @@ ) |
@@ -40,3 +40,3 @@ 'use strict'; | ||
'label', | ||
{ style: styles.label }, | ||
{ htmlFor: 'device', style: styles.label }, | ||
'Device' | ||
@@ -46,3 +46,3 @@ ), | ||
'select', | ||
{ style: styles.action, value: activeViewport, onChange: onChange }, | ||
{ style: styles.action, id: 'device', value: activeViewport, onChange: onChange }, | ||
_react2.default.createElement( | ||
@@ -49,0 +49,0 @@ 'option', |
{ | ||
"name": "@storybook/addon-viewport", | ||
"version": "3.4.0-alpha.8", | ||
"version": "3.4.0-alpha.9", | ||
"description": "Storybook addon to change the viewport size to mobile", | ||
@@ -14,3 +14,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@storybook/components": "^3.4.0-alpha.8", | ||
"@storybook/components": "^3.4.0-alpha.9", | ||
"global": "^4.3.2", | ||
@@ -17,0 +17,0 @@ "prop-types": "^15.5.10" |
@@ -5,3 +5,3 @@ # Storybook Viewport Addon | ||
This addon works with Storybook for: [React](https://github.com/storybooks/storybook/tree/master/app/react) and [Vue](https://github.com/storybooks/storybook/tree/master/app/vue). | ||
[Framework Support](https://github.com/storybooks/storybook/blob/master/ADDONS_SUPPORT.md) | ||
@@ -8,0 +8,0 @@ ![Screenshot](https://github.com/storybooks/storybook/blob/master/addons/viewport/docs/viewport.png) |
@@ -13,4 +13,6 @@ import React from 'react'; | ||
<div style={styles.row}> | ||
<label style={styles.label}>Rotate</label> | ||
<button {...props} style={actionStyles}> | ||
<label htmlFor="rotate" style={styles.label}> | ||
Rotate | ||
</label> | ||
<button id="rotate" {...props} style={actionStyles}> | ||
{active ? 'Vertical' : 'Landscape'} | ||
@@ -17,0 +19,0 @@ </button> |
@@ -10,4 +10,6 @@ import React from 'react'; | ||
<div style={styles.row}> | ||
<label style={styles.label}>Device</label> | ||
<select style={styles.action} value={activeViewport} onChange={onChange}> | ||
<label htmlFor="device" style={styles.label}> | ||
Device | ||
</label> | ||
<select style={styles.action} id="device" value={activeViewport} onChange={onChange}> | ||
<option value={defaultViewport}>Default</option> | ||
@@ -14,0 +16,0 @@ {Object.keys(viewports).map(key => ( |
import React from 'react'; | ||
import { shallow } from 'enzyme'; // eslint-disable-line import/no-extraneous-dependencies | ||
import { shallow } from 'enzyme'; | ||
import { document } from 'global'; | ||
@@ -4,0 +4,0 @@ |
import React from 'react'; | ||
import { shallow } from 'enzyme'; // eslint-disable-line import/no-extraneous-dependencies | ||
import { shallow } from 'enzyme'; | ||
import { RotateViewport } from '../RotateViewport'; | ||
@@ -4,0 +4,0 @@ import * as styles from '../styles'; |
import React from 'react'; | ||
import { shallow } from 'enzyme'; // eslint-disable-line import/no-extraneous-dependencies | ||
import { shallow } from 'enzyme'; | ||
import { SelectViewport } from '../SelectViewport'; | ||
@@ -4,0 +4,0 @@ import { viewports, defaultViewport } from '../viewportInfo'; |
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
993
232355