Skip to content
This repository has been archived by the owner on Mar 30, 2018. It is now read-only.

Commit

Permalink
Fix: React 15.6 warnings (#606)
Browse files Browse the repository at this point in the history
* fix onMouseEnter and onMouseLeave warnings

* Fix dependencies

* Fix "ratio" prop warning

* Update storybook

* update snapshots
  • Loading branch information
stipsan committed Sep 30, 2017
1 parent 20773ae commit 7009c7b
Show file tree
Hide file tree
Showing 16 changed files with 124 additions and 563 deletions.
2 changes: 1 addition & 1 deletion docs/iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<body>
<div id="root"></div>
<div id="error-display"></div>
<script src="static/preview.70054c4c87cea5f14b18.bundle.js"></script>
<script src="static/preview.c66250a68239afd199ff.bundle.js"></script>
</body>
</html>

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</head>
<body style="margin: 0;">
<div id="root"></div>
<script src="static/manager.cfe4c30ac4edf96602b0.bundle.js"></script>
<script src="static/manager.34b1afdbb43111143fc2.bundle.js"></script>
</body>
</html>

34 changes: 34 additions & 0 deletions docs/static/manager.34b1afdbb43111143fc2.bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/manager.34b1afdbb43111143fc2.bundle.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 0 additions & 34 deletions docs/static/manager.cfe4c30ac4edf96602b0.bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/static/manager.cfe4c30ac4edf96602b0.bundle.js.map

This file was deleted.

33 changes: 0 additions & 33 deletions docs/static/preview.70054c4c87cea5f14b18.bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/static/preview.70054c4c87cea5f14b18.bundle.js.map

This file was deleted.

33 changes: 33 additions & 0 deletions docs/static/preview.c66250a68239afd199ff.bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/static/preview.c66250a68239afd199ff.bundle.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 5 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"devDependencies": {
"@kadira/react-storybook-addon-info": "3.4.0",
"@kadira/storybook": "2.35.3",
"@kadira/storybook-deployer": "1.2.0",
"autoprefixer": "7.1.1",
"babel-cli": "6.24.1",
"babel-core": "6.24.1",
Expand All @@ -82,36 +81,29 @@
"eslint-plugin-import": "2.2.0",
"eslint-plugin-jsx-a11y": "5.0.1",
"eslint-plugin-react": "6.10.2",
"expect": "1.20.2",
"file-loader": "0.11.1",
"gh-release": "2.2.1",
"growl": "1.9.2",
"jest-cli": "20.0.1",
"jsdom": "11.0.0",
"json-loader": "0.5.4",
"less": "2.7.2",
"less-loader": "4.0.3",
"mocha": "3.3.0",
"postcss-loader": "1.3.3",
"prop-types": "^15.5.10",
"raw-loader": "^0.5.1",
"react": "15.5.4",
"react": "15.6.1",
"react-addons-test-utils": "15.5.1",
"react-dom": "15.5.4",
"react-dom": "15.6.1",
"react-height": "3.0.0",
"react-motion": "0.5.0",
"react-test-renderer": "15.5.4",
"release-relief": "^1.0.1",
"semver": "^5.3.0",
"semver-truncate": "^1.1.2",
"style-loader": "0.18.0",
"uikit": "3.0.0-beta.22",
"url-loader": "0.5.8"
},
"dependencies": {
"classnames": "2.2.5",
"classnames": "^2.2.5",
"computed-style": "^0.3.0",
"react-input-autosize": "1.1.4",
"react-portal": "3.1.0"
"react-input-autosize": "^1.1.4",
"react-portal": "^3.1.0"
}
}
7 changes: 4 additions & 3 deletions src/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,11 @@ export default class Dropdown extends Component {
const { mode, component, children, className } = this.props
const { isOpen } = this.state

const eventHandlers = {
const eventHandlers = mode === 'click' ? {
onClick: handleClick,
onMouseEnter: mode === 'hover' && handleMouseEnter,
onMouseLeave: mode === 'hover' && handleMouseLeave,
} : {
onMouseEnter: handleMouseEnter,
onMouseLeave: handleMouseLeave,
}

if (typeof children === 'function') {
Expand Down
1 change: 0 additions & 1 deletion src/Icon/Spinner.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class Spinner extends PureComponent {
<span className={cx('uk-icon uk-spinner', className)} ref={this.setContainer}>
<svg
height={size}
ratio="1"
viewBox={viewBox}
width={size}
xmlns="http://www.w3.org/2000/svg"
Expand Down
1 change: 0 additions & 1 deletion src/Icon/__tests__/__snapshots__/Spinner-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ exports[`should render correctly 1`] = `
>
<svg
height={32}
ratio="1"
viewBox="0 0 32 32"
width={32}
xmlns="http://www.w3.org/2000/svg"
Expand Down
Loading

0 comments on commit 7009c7b

Please sign in to comment.