From 0c9f5b0cde224d362769f9797bc9858ca89d6758 Mon Sep 17 00:00:00 2001 From: Randy Garces Date: Tue, 23 Jan 2018 15:02:48 +0800 Subject: [PATCH] Add PageHeader new props `tabBarExtraContent` to be pass to `Tabs` (#793) --- src/components/PageHeader/index.d.ts | 1 + src/components/PageHeader/index.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/PageHeader/index.d.ts b/src/components/PageHeader/index.d.ts index 40c80a49..518f2032 100644 --- a/src/components/PageHeader/index.d.ts +++ b/src/components/PageHeader/index.d.ts @@ -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; } diff --git a/src/components/PageHeader/index.js b/src/components/PageHeader/index.js index 4be9af62..ed86137d 100644 --- a/src/components/PageHeader/index.js +++ b/src/components/PageHeader/index.js @@ -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); @@ -171,6 +171,7 @@ export default class PageHeader extends PureComponent { className={styles.tabs} {...activeKeyProps} onChange={this.onChange} + tabBarExtraContent={tabBarExtraContent} > { tabList.map(item => ) -- GitLab