aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/top_bar/top_bar_menu_item.tsx
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-10-03 03:10:59 +0800
committerFabio Berger <me@fabioberger.com>2018-10-03 03:10:59 +0800
commitc07412a992284b2f3045be1c620ea2e0a351139a (patch)
tree5d1baea6ae5c1bb70b4bf61a28bd131026098f8f /packages/website/ts/components/top_bar/top_bar_menu_item.tsx
parent0c996803969e7ff3f62c023651f64468b3f76bd3 (diff)
downloaddexon-sol-tools-c07412a992284b2f3045be1c620ea2e0a351139a.tar
dexon-sol-tools-c07412a992284b2f3045be1c620ea2e0a351139a.tar.gz
dexon-sol-tools-c07412a992284b2f3045be1c620ea2e0a351139a.tar.bz2
dexon-sol-tools-c07412a992284b2f3045be1c620ea2e0a351139a.tar.lz
dexon-sol-tools-c07412a992284b2f3045be1c620ea2e0a351139a.tar.xz
dexon-sol-tools-c07412a992284b2f3045be1c620ea2e0a351139a.tar.zst
dexon-sol-tools-c07412a992284b2f3045be1c620ea2e0a351139a.zip
Use new Link UI component everywhere, and add complementary ALink type
Diffstat (limited to 'packages/website/ts/components/top_bar/top_bar_menu_item.tsx')
-rw-r--r--packages/website/ts/components/top_bar/top_bar_menu_item.tsx22
1 files changed, 6 insertions, 16 deletions
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 25fab2868..89fd9e8a8 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
@@ -1,7 +1,8 @@
import { colors } from '@0xproject/react-shared';
import * as _ from 'lodash';
import * as React from 'react';
-import { Link } from 'react-router-dom';
+import { Link } from 'ts/components/ui/link';
+import { LinkType } from 'ts/types';
import { CallToAction } from 'ts/components/ui/button';
@@ -13,7 +14,7 @@ interface TopBarMenuItemProps {
title: string;
path?: string;
isPrimary?: boolean;
- isExternal: boolean;
+ linkType: LinkType;
style?: React.CSSProperties;
className?: string;
isNightVersion?: boolean;
@@ -38,20 +39,9 @@ export class TopBarMenuItem extends React.Component<TopBarMenuItemProps, TopBarM
);
return (
<div className={`center ${this.props.className}`} style={{ ...this.props.style, color: menuItemColor }}>
- {this.props.isExternal ? (
- <a
- className="text-decoration-none"
- style={{ color: linkColor }}
- target="_blank"
- href={this.props.path}
- >
- {itemContent}
- </a>
- ) : (
- <Link to={this.props.path} className="text-decoration-none" style={{ color: linkColor }}>
- {itemContent}
- </Link>
- )}
+ <Link to={this.props.path} type={this.props.linkType} style={{ color: linkColor }}>
+ {itemContent}
+ </Link>
</div>
);
}