aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs/src
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-09-28 02:49:07 +0800
committerFabio Berger <me@fabioberger.com>2018-09-28 02:49:07 +0800
commitcfddea931dedb77a88507517957e19350e9348b8 (patch)
tree241694f1744f1c46a46b36ab9f9a0a661b2a341a /packages/react-docs/src
parenta6672e0190573c65f2c36e303d49f0389f5a9a26 (diff)
downloaddexon-sol-tools-cfddea931dedb77a88507517957e19350e9348b8.tar
dexon-sol-tools-cfddea931dedb77a88507517957e19350e9348b8.tar.gz
dexon-sol-tools-cfddea931dedb77a88507517957e19350e9348b8.tar.bz2
dexon-sol-tools-cfddea931dedb77a88507517957e19350e9348b8.tar.lz
dexon-sol-tools-cfddea931dedb77a88507517957e19350e9348b8.tar.xz
dexon-sol-tools-cfddea931dedb77a88507517957e19350e9348b8.tar.zst
dexon-sol-tools-cfddea931dedb77a88507517957e19350e9348b8.zip
Make sure basic solidity types are colored orange
Diffstat (limited to 'packages/react-docs/src')
-rw-r--r--packages/react-docs/src/components/type.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx
index 156a3496d..b7a94483e 100644
--- a/packages/react-docs/src/components/type.tsx
+++ b/packages/react-docs/src/components/type.tsx
@@ -13,6 +13,7 @@ import { Signature } from './signature';
import { TypeDefinition } from './type_definition';
const basicJsTypes = ['string', 'number', 'undefined', 'null', 'boolean'];
+const basicSolidityTypes = ['bytes', 'bytes4', 'uint256', 'address'];
const defaultProps = {};
@@ -80,7 +81,7 @@ export const Type: React.SFC<TypeProps> = (props: TypeProps): any => {
case TypeDocTypes.Array:
typeName = type.elementType.name;
- if (_.includes(basicJsTypes, typeName)) {
+ if (_.includes(basicJsTypes, typeName) || _.includes(basicSolidityTypes, typeName)) {
typeNameColor = colors.orange;
}
break;