diff options
author | Fabio Berger <me@fabioberger.com> | 2018-08-16 02:36:45 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-08-16 02:36:45 +0800 |
commit | a8d44ccc48a7177e749f534a237afb7b9c0f2f2b (patch) | |
tree | 35e931893e7d73c32b54fa42ca31930e2fd4540d /packages/react-docs/src/components/type.tsx | |
parent | 3b8a343711e0b23a453a1466411e2b9ca68eb0b2 (diff) | |
download | dexon-sol-tools-a8d44ccc48a7177e749f534a237afb7b9c0f2f2b.tar dexon-sol-tools-a8d44ccc48a7177e749f534a237afb7b9c0f2f2b.tar.gz dexon-sol-tools-a8d44ccc48a7177e749f534a237afb7b9c0f2f2b.tar.bz2 dexon-sol-tools-a8d44ccc48a7177e749f534a237afb7b9c0f2f2b.tar.lz dexon-sol-tools-a8d44ccc48a7177e749f534a237afb7b9c0f2f2b.tar.xz dexon-sol-tools-a8d44ccc48a7177e749f534a237afb7b9c0f2f2b.tar.zst dexon-sol-tools-a8d44ccc48a7177e749f534a237afb7b9c0f2f2b.zip |
Move external types to link mapping to doc generation util and refactor typedocUtils to be a class to avoid excessive param passing
Diffstat (limited to 'packages/react-docs/src/components/type.tsx')
-rw-r--r-- | packages/react-docs/src/components/type.tsx | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index eae52e950..145c797a3 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -179,17 +179,8 @@ export const Type: React.SFC<TypeProps> = (props: TypeProps): any => { return [prev, ', ', curr]; }); - let typeNameUrlIfExists; - let typePrefixIfExists; - if (!_.isUndefined(props.docsInfo.typeConfigs)) { - typeNameUrlIfExists = !_.isUndefined(props.docsInfo.typeConfigs.typeNameToExternalLink) - ? props.docsInfo.typeConfigs.typeNameToExternalLink[typeName as string] - : undefined; - typePrefixIfExists = !_.isUndefined(props.docsInfo.typeConfigs.typeNameToPrefix) - ? props.docsInfo.typeConfigs.typeNameToPrefix[typeName as string] - : undefined; - } const isExportedClassReference = !!props.type.isExportedClassReference; + const typeNameUrlIfExists = !_.isUndefined(props.type.externalLink) ? props.type.externalLink : undefined; if (!_.isUndefined(typeNameUrlIfExists)) { typeName = ( <a @@ -198,7 +189,6 @@ export const Type: React.SFC<TypeProps> = (props: TypeProps): any => { className="text-decoration-none" style={{ color: colors.lightBlueA700 }} > - {!_.isUndefined(typePrefixIfExists) ? `${typePrefixIfExists}.` : ''} {typeName} </a> ); |