[Ivan Diaz] - Remove tab character

This commit is contained in:
Ivan Diaz 2015-08-28 21:37:30 -03:00
parent 7016f342d0
commit e0cf09eede
2 changed files with 43 additions and 43 deletions

View File

@ -8,37 +8,37 @@ import classNames from 'classnames';
var Button = React.createClass({ var Button = React.createClass({
propTypes: { propTypes: {
children: React.PropTypes.node, children: React.PropTypes.node,
type: React.PropTypes.oneOf([ type: React.PropTypes.oneOf([
'primary' 'primary'
]) ])
}, },
getDefaultProps() { getDefaultProps() {
return { return {
type: 'primary' type: 'primary'
}; };
}, },
render() { render() {
return ( return (
<button {...this.props} className={this.getClass()}> <button {...this.props} className={this.getClass()}>
{this.props.children} {this.props.children}
</button> </button>
); );
}, },
getClass() { getClass() {
var classes = { var classes = {
'button': true 'button': true
}; };
classes['button-' + this.props.type] = (this.props.type); classes['button-' + this.props.type] = (this.props.type);
classes[this.props.className] = (this.props.className); classes[this.props.className] = (this.props.className);
return classNames(classes); return classNames(classes);
} }
}); });
export default Button; export default Button;

View File

@ -2,27 +2,27 @@ import React from 'react/addons';
import classNames from 'classnames'; import classNames from 'classnames';
var Widget = React.createClass({ var Widget = React.createClass({
propTypes: { propTypes: {
children: React.PropTypes.node.isRequired children: React.PropTypes.node.isRequired
}, },
render() { render() {
return ( return (
<div className={this.getClass()}> <div className={this.getClass()}>
{this.props.children} {this.props.children}
</div> </div>
); );
}, },
getClass() { getClass() {
var classes = { var classes = {
'widget': true 'widget': true
}; };
classes[this.props.className] = (this.props.className); classes[this.props.className] = (this.props.className);
return classNames(classes); return classNames(classes);
} }
}); });
export default Widget; export default Widget;