Skip to content

Commit

Permalink
Css imported like prop react-component#2
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniogiordano committed Jan 27, 2017
1 parent b1f3b13 commit cb34787
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"saucelabs": "rc-tools run saucelabs",
"test": "jest",
"chrome-test": "rc-tools run chrome-test",
"coverage": "jest --coverage && cat ./coverage/lcov.info | coveralls"
"coverage": "jest --coverage && cat ./coverage/lcov.info | coveralls",
"lib": "babel src --out-dir lib -w"
},
"jest": {
"collectCoverageFrom": [
Expand Down
3 changes: 1 addition & 2 deletions src/MenuItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@ const MenuItem = React.createClass({
onDestroy: PropTypes.func,
onMouseEnter: PropTypes.func,
onMouseLeave: PropTypes.func,
css: PropTypes.object,
css: PropTypes.object.isRequired,
},

getDefaultProps() {
return {
onSelect: noop,
onMouseEnter: noop,
onMouseLeave: noop,
css: require('../assets/index.css'),
};
},

Expand Down
3 changes: 1 addition & 2 deletions src/MenuMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ const MenuMixin = {
defaultOpenKeys: PropTypes.arrayOf(PropTypes.string),
openKeys: PropTypes.arrayOf(PropTypes.string),
children: PropTypes.any,
css: PropTypes.object,
},

getDefaultProps() {
Expand All @@ -77,7 +76,6 @@ const MenuMixin = {
visible: true,
focusable: true,
style: {},
css: require('../assets/index.css'),
};
},

Expand Down Expand Up @@ -222,6 +220,7 @@ const MenuMixin = {
onItemHover: this.onItemHover,
active: !childProps.disabled && isActive,
multiple: props.multiple,
css: props.css,
onClick: this.onClick,
openTransitionName: this.getOpenTransitionName(),
openAnimation: props.openAnimation,
Expand Down

0 comments on commit cb34787

Please sign in to comment.