From ddf4437fb66fd5bb45572a330fdf383b973ce373 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 8 Feb 2018 17:36:17 -0800 Subject: Add blog to topBar and as a consequence support external links in topBar menu items --- packages/website/ts/components/top_bar/top_bar.tsx | 10 ++++++++++ .../ts/components/top_bar/top_bar_menu_item.tsx | 18 +++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index 1a0691e83..b1367be4f 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -169,12 +169,21 @@ export class TopBar extends React.Component { path={`${WebsitePaths.Wiki}`} style={styles.menuItem} isNightVersion={isNightVersion} + isExternal={false} + /> + { style={styles.menuItem} className={`${isFullWidthPage && 'md-hide'}`} isNightVersion={isNightVersion} + isExternal={false} /> diff --git a/packages/website/ts/components/top_bar/top_bar_menu_item.tsx b/packages/website/ts/components/top_bar/top_bar_menu_item.tsx index 96ee86142..983050abc 100644 --- a/packages/website/ts/components/top_bar/top_bar_menu_item.tsx +++ b/packages/website/ts/components/top_bar/top_bar_menu_item.tsx @@ -11,6 +11,7 @@ interface TopBarMenuItemProps { title: string; path?: string; isPrimary?: boolean; + isExternal: boolean; style?: React.CSSProperties; className?: string; isNightVersion?: boolean; @@ -43,9 +44,20 @@ export class TopBarMenuItem extends React.Component - - {this.props.title} - + {this.props.isExternal ? ( + + {this.props.title} + + ) : ( + + {this.props.title} + + )} ); } -- cgit