improve tabBarExtraContent render

This commit is contained in:
afc163 2016-04-17 17:47:08 +08:00
parent 0fb0b465f6
commit 05299036b4

View File

@ -58,14 +58,16 @@ class AntTabs extends React.Component {
);
}
tabBarExtraContent = tabBarExtraContent ? (
<div className={`${prefixCls}-extra-content`}>
{tabBarExtraContent}
</div>
) : null;
return (
<Tabs {...this.props}
className={className}
tabBarExtraContent={
<div className={`${prefixCls}-extra-content`}>
{tabBarExtraContent}
</div>
}
tabBarExtraContent={tabBarExtraContent}
onChange={this.handleChange}
animation={animation}>
{children}