refactor: joinClasses is removed in React@0.14.x

This commit is contained in:
Benjy Cui 2015-10-09 10:55:52 +08:00 committed by afc163
parent 27477784ee
commit 3be9ad0ad0

View File

@ -1,5 +1,4 @@
import React from 'react';
import joinClasses from 'react/lib/joinClasses';
import rcUtil from 'rc-util';
function getScroll(w, top) {
@ -89,12 +88,14 @@ let Affix = React.createClass({
},
render() {
let affix = this.state.affix ? 'ant-affix' : '';
let className = this.props.className;
const className = rcUtil.classSet({
[`${this.props.className}`]: this.props.className,
['ant-affix']: this.state.affix
});
return (
<div {...this.props}>
<div className={joinClasses(className, affix)} style={this.state.affixStyle}>
<div className={className} style={this.state.affixStyle}>
{this.props.children}
</div>
</div>