mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
refactor: joinClasses
is removed in React@0.14.x
This commit is contained in:
parent
27477784ee
commit
3be9ad0ad0
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user