Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing 'Warning: module.exports.type is deprecated. Please use modul… #27

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dist/react-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ var Menu = module.exports = React.createClass({
var trigger;
if(this.verifyTwoChildren()) {
React.Children.forEach(this.props.children, function(child){
if (child.type === MenuTrigger.type) {
if (child === MenuTrigger) {
trigger = cloneWithProps(child, {
ref: 'trigger',
onToggleActive: this.handleTriggerToggle
Expand All @@ -121,7 +121,7 @@ var Menu = module.exports = React.createClass({
var options;
if(this.verifyTwoChildren()) {
React.Children.forEach(this.props.children, function(child){
if (child.type === MenuOptions.type) {
if (child === MenuOptions) {
options = cloneWithProps(child, {
ref: 'options',
horizontalPlacement: this.state.horizontalPlacement,
Expand Down Expand Up @@ -1340,4 +1340,4 @@ module.exports = warning;

},{"./emptyFunction":16}]},{},[7])
(7)
});
});
6 changes: 3 additions & 3 deletions lib/components/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var React = require('react');

var cloneWithProps = require('react/lib/cloneWithProps');
var cloneWithProps = React.addons.cloneWithProps;
var MenuTrigger = require('./MenuTrigger');
var MenuOptions = require('./MenuOptions');
var MenuOption = require('./MenuOption');
Expand Down Expand Up @@ -105,7 +105,7 @@ var Menu = module.exports = React.createClass({
var trigger;
if(this.verifyTwoChildren()) {
React.Children.forEach(this.props.children, function(child){
if (child.type === MenuTrigger.type) {
if (child === MenuTrigger) {
trigger = cloneWithProps(child, {
ref: 'trigger',
onToggleActive: this.handleTriggerToggle
Expand All @@ -120,7 +120,7 @@ var Menu = module.exports = React.createClass({
var options;
if(this.verifyTwoChildren()) {
React.Children.forEach(this.props.children, function(child){
if (child.type === MenuOptions.type) {
if (child === MenuOptions) {
options = cloneWithProps(child, {
ref: 'options',
horizontalPlacement: this.state.horizontalPlacement,
Expand Down
2 changes: 1 addition & 1 deletion lib/components/MenuOptions.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @jsx React.DOM */

var React = require('react');
var cloneWithProps = React.addons.cloneWithProps;
var MenuOption = require('./MenuOption');
var cloneWithProps = require('react/lib/cloneWithProps')
var buildClassName = require('../mixins/buildClassName');

var MenuOptions = module.exports = React.createClass({
Expand Down
4 changes: 2 additions & 2 deletions lib/helpers/injectCSS.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ module.exports = function() {
cursor: 'pointer'
},
'.Menu__MenuOption--disabled': {
'background-color': '#eee',
'background-color': '#eee'
},
'.Menu__MenuOption--active': {
'background-color': '#0aafff',
'background-color': '#0aafff'
},
'.Menu__MenuOption--active.Menu__MenuOption--disabled': {
'background-color': '#ccc'
Expand Down
2 changes: 1 addition & 1 deletion lib/mixins/buildClassName.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ module.exports = {
name += ' ' + this.props.className;
}
return name;
},
}
};