Skip to content

Commit

Permalink
Merge pull request #471 from mmrtnz/master
Browse files Browse the repository at this point in the history
Updated mui to use peer dependency changes.
  • Loading branch information
mmrtnz committed Mar 27, 2015
2 parents 953606f + a2c859a commit b58ba82
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "material-ui-docs",
"version": "0.6.1",
"version": "0.7.2",
"description": "Documentation site for material-ui",
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions docs/src/app/components/app-left-nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ var AppLeftNav = React.createClass({

for (var i = menuItems.length - 1; i >= 0; i--) {
currentItem = menuItems[i];
if (currentItem.route && this.isActive(currentItem.route)) return i;
if (currentItem.route && this.context.router.isActive(currentItem.route)) return i;
};
},

_onLeftNavChange: function(e, key, payload) {
this.transitionTo(payload.route);
this.context.router.transitionTo(payload.route);
},

_onHeaderClick: function() {
this.transitionTo('root');
this.context.router.transitionTo('root');
this.refs.leftNav.close();
}

Expand Down
6 changes: 3 additions & 3 deletions docs/src/app/components/master.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ var Master = React.createClass({
render: function() {

var title =
this.isActive('get-started') ? 'Get Started' :
this.isActive('css-framework') ? 'Css Framework' :
this.isActive('components') ? 'Components' : '';
this.context.router.isActive('get-started') ? 'Get Started' :
this.context.router.isActive('css-framework') ? 'Css Framework' :
this.context.router.isActive('components') ? 'Components' : '';
var githubButton = (
<IconButton
className="github-icon-button"
Expand Down
6 changes: 3 additions & 3 deletions docs/src/app/components/pages/components/tabs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ var TabsPage = React.createClass({
'</Tabs> \n' +
'\n' +
'_onActive: function(tab){ \n' +
' this.transitionTo(tab.props.route); \n' +
' this.context.router.transitionTo(tab.props.route); \n' +
'}';

var desc = 'Refs cannont be set on individual Tab components as cloneWithProps is being ' +
var desc = 'Refs cannot be set on individual Tab components as cloneWithProps is being ' +
'used to extend the individual tab components under the hood. However, ' +
'refs can be passed to the Tabs container and to any element or component within the template. ' +
'If you need to access a tab directly - you can do so with the first argument of onActive or ' +
Expand Down Expand Up @@ -155,7 +155,7 @@ var TabsPage = React.createClass({
},

_onActive: function(tab){
this.transitionTo(tab.props.route);
this.context.router.transitionTo(tab.props.route);
}
});

Expand Down
2 changes: 1 addition & 1 deletion docs/src/app/components/pages/home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ var HomePage = React.createClass({
},

_onDemoClick: function() {
this.transitionTo('components');
this.context.router.transitionTo('components');
}

});
Expand Down
4 changes: 2 additions & 2 deletions docs/src/app/components/pages/page-with-nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ var PageWithNav = React.createClass({

for (var i = menuItems.length - 1; i >= 0; i--) {
currentItem = menuItems[i];
if (currentItem.route && this.isActive(currentItem.route)) return i;
if (currentItem.route && this.context.router.isActive(currentItem.route)) return i;
};
},

_onMenuItemClick: function(e, index, item) {
this.transitionTo(item.route);
this.context.router.transitionTo(item.route);
}

});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"homepage": "http://material-ui.com/",
"dependencies": {
"react-classset": "0.0.2",
"classnames": "^1.2.0",
"react-draggable2": "^0.5.1"
},
"peerDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions src/js/input.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var React = require('react');
var Classable = require('./mixins/classable');
var classSet = require('react-classset');
var ClassNames = require('classnames');

var Input = React.createClass({

Expand Down Expand Up @@ -47,10 +47,10 @@ var Input = React.createClass({
});
var placeholder = this.props.inlinePlaceholder ? this.props.placeholder : "";
var inputIsNotEmpty = !!this.state.value;
var inputClassName = classSet({
var inputClassName = ClassNames({
'mui-is-not-empty': inputIsNotEmpty
});
var textareaClassName = classSet({
var textareaClassName = ClassNames({
'mui-input-textarea': true,
'mui-is-not-empty': inputIsNotEmpty
});
Expand Down
8 changes: 4 additions & 4 deletions src/js/mixins/classable.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var React = require('react');
var classSet = require('react-classset');
var classNames = require('classnames');

module.exports = {

Expand All @@ -15,16 +15,16 @@ module.exports = {

//Add in initial classes
if (typeof initialClasses === 'object') {
classString += ' ' + classSet(initialClasses);
classString += ' ' + classNames(initialClasses);
} else {
classString += ' ' + initialClasses;
}

//Add in additional classes
if (additionalClassObj) classString += ' ' + classSet(additionalClassObj);
if (additionalClassObj) classString += ' ' + classNames(additionalClassObj);

//Convert the class string into an object and run it through the class set
return classSet(this.getClassSet(classString));
return classNames(this.getClassSet(classString));
},

getClassSet: function(classString) {
Expand Down
2 changes: 1 addition & 1 deletion src/js/mixins/dom-idable.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {

getDomId: function() {
return 'dom_id' + this._rootNodeID.replace(/\./g, '_');
return 'dom_id' + this._reactInternalInstance._rootNodeID.replace(/\./g, '_');
}

}

0 comments on commit b58ba82

Please sign in to comment.