Skip to content

Commit

Permalink
fix: drop className for tabBar, fix #12051
Browse files Browse the repository at this point in the history
  • Loading branch information
picodoth authored and afc163 committed Sep 15, 2018
1 parent f0f44c6 commit 589bafd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/card/__tests__/__snapshots__/demo.test.js.snap
Expand Up @@ -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"
>
Expand Down Expand Up @@ -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"
>
Expand Down
4 changes: 3 additions & 1 deletion components/tabs/index.tsx
Expand Up @@ -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}
>
Expand Down

0 comments on commit 589bafd

Please sign in to comment.