Skip to content

Commit

Permalink
Add PageHeader new props tabBarExtraContent to be pass to Tabs (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
kamote authored and ddcat1115 committed Jan 23, 2018
1 parent 9691ce3 commit 0c9f5b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/PageHeader/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface PageHeaderProps {
tabList?: Array<{ key: string; tab: React.ReactNode }>;
tabActiveKey?: string;
onTabChange?: (key: string) => void;
tabBarExtraContent?: React.ReactNode;
linkElement?: React.ReactNode;
style?: React.CSSProperties;
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/PageHeader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export default class PageHeader extends PureComponent {
render() {
const {
title, logo, action, content, extraContent,
tabList, className, tabActiveKey,
tabList, className, tabActiveKey, tabBarExtraContent,
} = this.props;
const clsString = classNames(styles.pageHeader, className);

Expand Down Expand Up @@ -171,6 +171,7 @@ export default class PageHeader extends PureComponent {
className={styles.tabs}
{...activeKeyProps}
onChange={this.onChange}
tabBarExtraContent={tabBarExtraContent}
>
{
tabList.map(item => <TabPane tab={item.tab} key={item.key} />)
Expand Down

0 comments on commit 0c9f5b0

Please sign in to comment.