fix: drop className for tabBar, fix #12051

This commit is contained in:
picodoth 2018-09-06 14:36:40 +08:00 committed by 偏右
parent f0f44c6608
commit 589bafd5db
2 changed files with 5 additions and 3 deletions

View File

@ -811,7 +811,7 @@ exports[`renders ./components/card/demo/tabs.md correctly 1`] = `
class="ant-tabs ant-tabs-top ant-card-head-tabs ant-tabs-large ant-tabs-line"
>
<div
class="ant-tabs-bar ant-card-head-tabs"
class="ant-tabs-bar"
role="tablist"
tabindex="0"
>
@ -946,7 +946,7 @@ exports[`renders ./components/card/demo/tabs.md correctly 1`] = `
class="ant-tabs ant-tabs-top ant-card-head-tabs ant-tabs-large ant-tabs-line"
>
<div
class="ant-tabs-bar ant-card-head-tabs"
class="ant-tabs-bar"
role="tablist"
tabindex="0"
>

View File

@ -158,12 +158,14 @@ export default class Tabs extends React.Component<TabsProps, any> {
</div>
) : null;
const { className: dropped, ...tabBarProps } = this.props;
return (
<RcTabs
{...this.props}
className={cls}
tabBarPosition={tabPosition}
renderTabBar={() => <TabBar {...this.props} tabBarExtraContent={tabBarExtraContent}/>}
renderTabBar={() => <TabBar {...tabBarProps} tabBarExtraContent={tabBarExtraContent}/>}
renderTabContent={() => <TabContent animated={tabPaneAnimated} animatedWithMargin />}
onChange={this.handleChange}
>