aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs/src/components/type.tsx
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-10-05 21:55:28 +0800
committerFabio Berger <me@fabioberger.com>2018-10-05 21:55:28 +0800
commitfa6bd348992674192d07fef3d60950980212ecbb (patch)
tree7b8fb8323c972291ddb1c77bc45f73bf39a8f805 /packages/react-docs/src/components/type.tsx
parent5f2cd33da07a7acc65f2e05acb35755f74af75a4 (diff)
downloaddexon-sol-tools-fa6bd348992674192d07fef3d60950980212ecbb.tar
dexon-sol-tools-fa6bd348992674192d07fef3d60950980212ecbb.tar.gz
dexon-sol-tools-fa6bd348992674192d07fef3d60950980212ecbb.tar.bz2
dexon-sol-tools-fa6bd348992674192d07fef3d60950980212ecbb.tar.lz
dexon-sol-tools-fa6bd348992674192d07fef3d60950980212ecbb.tar.xz
dexon-sol-tools-fa6bd348992674192d07fef3d60950980212ecbb.tar.zst
dexon-sol-tools-fa6bd348992674192d07fef3d60950980212ecbb.zip
Remove type prop and instead infer it from the value of to
Diffstat (limited to 'packages/react-docs/src/components/type.tsx')
-rw-r--r--packages/react-docs/src/components/type.tsx11
1 files changed, 3 insertions, 8 deletions
diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx
index 2e0003198..1ae1324c6 100644
--- a/packages/react-docs/src/components/type.tsx
+++ b/packages/react-docs/src/components/type.tsx
@@ -1,4 +1,4 @@
-import { colors, constants as sharedConstants, utils as sharedUtils } from '@0xproject/react-shared';
+import { colors, constants as sharedConstants, Link, utils as sharedUtils } from '@0xproject/react-shared';
import { Type as TypeDef, TypeDefinitionByName, TypeDocTypes } from '@0xproject/types';
import { errorUtils } from '@0xproject/utils';
import * as _ from 'lodash';
@@ -205,14 +205,9 @@ export const Type: React.SFC<TypeProps> = (props: TypeProps): any => {
const typeNameUrlIfExists = !_.isUndefined(props.type.externalLink) ? props.type.externalLink : undefined;
if (!_.isUndefined(typeNameUrlIfExists)) {
typeName = (
- <a
- href={typeNameUrlIfExists}
- target="_blank"
- className="text-decoration-none"
- style={{ color: colors.lightBlueA700 }}
- >
+ <Link to={typeNameUrlIfExists} shouldOpenInNewTab={true} fontColor={colors.lightBlueA700}>
{typeName}
- </a>
+ </Link>
);
} else if (
(isReference || isArray) &&